Rule to warn about aria-label on static elements
See original GitHub issueExpectation: I think a new rule to warn about aria-label on static elements would be welcome.
https://developer.paciellogroup.com/blog/2017/07/short-note-on-aria-label-aria-labelledby-and-aria-describedby/ as one example of the rules to follow.
Actual: New rule, so nothing happens yet.
Motivation: This tripped me up when starting out – it’s not obvious that aria-label will not override the text in an element. It some cases it’s easier to add aria-label than to add an additional element with sr-only, and I didn’t find it intuitive as to why that’d be better.
Additionally, at least VO (Mac / iOS) does respect the aria-label as the label that’s read, so it’s not a consistently implemented rule and can be missed in testing.
I think an especially common case for this is with something like icon fonts.
<i class="fa fa-cog" aria-label="Settings"></i>
seems like an intuitive thing to do.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Sure, I’ll try to give it a go soon!
Good idea. Seems like a good best-practice rule. Are you interested in writing the rule?