Skip to content

Commit

Permalink
Toolbar Example: Remove use of aria-selected (pull #546)
Browse files Browse the repository at this point in the history
Fixes issue #540.
  • Loading branch information
gerardkcohen authored and mcking65 committed Nov 29, 2017
1 parent a1de1af commit 0fe1784
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions examples/toolbar/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ aria.Toolbar.prototype.checkClickItem = function (evt) {
*/
aria.Toolbar.prototype.deselectItem = function (element) {
aria.Utils.removeClass(element, 'selected');
element.setAttribute('aria-selected', 'false');
element.setAttribute('tabindex', '-1');
};

Expand All @@ -101,7 +100,6 @@ aria.Toolbar.prototype.deselectItem = function (element) {
aria.Toolbar.prototype.selectItem = function (element) {
this.deselectItem(this.selectedItem);
aria.Utils.addClass(element, 'selected');
element.setAttribute('aria-selected', 'true');
element.setAttribute('tabindex', '0');
this.selectedItem = element;
};
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar/toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 id="ex_label">Example</h2>
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
<div id="ex1">
<div class="toolbar" role="toolbar">
<div class="toolbar-item selected" role="button" tabindex="0" aria-selected="true">
<div class="toolbar-item selected" role="button" tabindex="0">
Tool 1
</div>
<div class="toolbar-item" role="button" tabindex="-1">Tool 2</div>
Expand Down

0 comments on commit 0fe1784

Please sign in to comment.