Skip to content

Commit

Permalink
fix(input): remove placeholder from button accessibility tree (angula…
Browse files Browse the repository at this point in the history
  • Loading branch information
Splaktar authored and mmalerba committed Aug 14, 2018
1 parent 4b1b729 commit 2203eec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,11 @@ function placeholderDirective($compile) {
}

// md-select handles placeholders on it's own
if (element[0].nodeName != 'MD-SELECT') {
if (element[0].nodeName !== 'MD-SELECT') {
// Move the placeholder expression to the label
var newLabel = angular.element('<label ng-click="delegateClick()" tabindex="-1">' + attr.placeholder + '</label>');
var newLabel = angular.element(
'<label ng-click="delegateClick()" tabindex="-1" aria-hidden="true">' + attr.placeholder +
'</label>');

// Note that we unset it via `attr`, in order to get AngularJS
// to remove any observers that it might have set up. Otherwise
Expand Down

0 comments on commit 2203eec

Please sign in to comment.