Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aria-label warning with ng-switch #8237

Closed
calebegg opened this issue Apr 27, 2016 · 2 comments
Closed

aria-label warning with ng-switch #8237

calebegg opened this issue Apr 27, 2016 · 2 comments

Comments

@calebegg
Copy link
Member

@calebegg calebegg commented Apr 27, 2016

Demo:

http://codepen.io/calebegg/pen/bpmGqQ?editors=1010

This code triggers a warning about aria-label being missing on the button, even though the button is guaranteed to have text content, since there's an ng-switch-default.

    <md-button ng-switch on="'x'">
      <span ng-switch-when="x">x</span>
      <span ng-switch-default>y</span>
    </md-button>
@devversion
Copy link
Member

@devversion devversion commented Apr 27, 2016

That seems to be a problem, with the DOM modification. Since the switch elements are appended dynamically to the DOM, and we're not updating our label text.

I guess, using an Observer would be overkill.

@ThomasBurleson
Copy link
Contributor

@ThomasBurleson ThomasBurleson commented Apr 29, 2016

Edge case - will not fix for ngMaterial v1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.