Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(chips): adds aria-hidden to remove buttons
Browse files Browse the repository at this point in the history
Closes #2345

Note:  That bug number was very satisfying to type.
  • Loading branch information
Robert Messerle committed Apr 15, 2015
1 parent e54cb8e commit 79b0739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/chips/js/chipRemoveDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// Child elements aren't available until after a $timeout tick as they are hidden by an
// `ng-if`. see http://goo.gl/zIWfuw
$timeout(function() {
element.attr('tabindex', '-1');
element.attr({ tabindex: -1, ariaHidden: true });
element.find('button').attr('tabindex', '-1');
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/chips/js/chipsDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index}">\
<div class="md-chip-content"\
tabindex="-1"\
aria-hidden="true"\
ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)"\
md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div>\
<div class="md-chip-remove-container"\
Expand Down Expand Up @@ -127,6 +128,7 @@
class="md-chip-remove"\
ng-if="!$mdChipsCtrl.readonly"\
ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"\
aria-hidden="true"\
tabindex="-1">\
<md-icon md-svg-icon="close"></md-icon>\
<span class="md-visually-hidden">\
Expand Down

0 comments on commit 79b0739

Please sign in to comment.