Skip to content

Commit 7f1100c

Browse files
committed
fix(WAI-ARIA): make aria-expanded prop valid in preact
Preact will ignore the prop which value is boolean false Convert the value to string can avoid this problem
1 parent 3215b81 commit 7f1100c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# History
22
----
33

4+
## 1.9.1 2018-05-10
5+
6+
- Fix invalid aria-expanded prop in preact
7+
48
## 1.9.0 2018-04-02
59

610
- Add keyboard support [#84](https://github.com/react-component/collapse/pull/84)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-collapse",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "rc-collapse ui component for react",
55
"keywords": [
66
"react",

src/Panel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CollapsePanel extends Component {
4949
onClick={this.handleItemClick}
5050
role={accordion ? 'tab' : 'button'}
5151
tabIndex={disabled ? -1 : 0}
52-
aria-expanded={isActive}
52+
aria-expanded={`${isActive}`}
5353
onKeyPress={this.handleKeyPress}
5454
>
5555
{showArrow && <i className="arrow" />}

0 commit comments

Comments
 (0)