Skip to content

Commit e99c5fa

Browse files
committed
Add aria-label to toggle buttons
Addresses #21
1 parent 307552e commit e99c5fa

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
* [#20]: Add support for `label` in `nodes` property and deprecate `title`
88

9+
### New Features
10+
11+
* [#21]: Add greater accessibility support
12+
913
## [v0.4.0](https://github.com/jakezatecky/react-dual-listbox/compare/v0.3.0...v0.4.0) (2017-01-27)
1014

1115
### Bug Fixes

examples/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10175,7 +10175,7 @@ var TreeNode = function (_React$Component) {
1017510175
{ className: 'rct-text' },
1017610176
_react2.default.createElement(
1017710177
'button',
10178-
{ className: 'rct-collapse', title: 'Toggle', onClick: this.onExpand },
10178+
{ 'aria-label': 'Toggle', className: 'rct-collapse', title: 'Toggle', onClick: this.onExpand },
1017910179
this.renderCollapseIcon()
1018010180
),
1018110181
_react2.default.createElement(
@@ -10194,7 +10194,7 @@ var TreeNode = function (_React$Component) {
1019410194
),
1019510195
_react2.default.createElement(
1019610196
'span',
10197-
{ className: 'rct-label' },
10197+
{ className: 'rct-title' },
1019810198
label
1019910199
)
1020010200
)

examples/dist/style.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@
7979
opacity: .5;
8080
}
8181

82-
.rct-label {
83-
margin-right: 5px;
84-
}
85-
8682
* {
8783
box-sizing: border-box;
8884
}

src/js/TreeNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class TreeNode extends React.Component {
107107
return (
108108
<li className="rct-node">
109109
<span className="rct-text">
110-
<button className="rct-collapse" title="Toggle" onClick={this.onExpand}>
110+
<button aria-label="Toggle" className="rct-collapse" title="Toggle" onClick={this.onExpand}>
111111
{this.renderCollapseIcon()}
112112
</button>
113113
<label htmlFor={inputId}>

0 commit comments

Comments
 (0)