Accessibility: 'Buttons do not have an accessible name'
See original GitHub issueLighthouse accessibility audit message ‘Buttons do not have an accessible name’. Here are the two element listed:
<button type="button" class="control-arrow control-prev"></button>
<button type="button" class="control-arrow control-next"></button>
Would this pass by just adding a role
or aria-label
to these buttons? If so I would like to make a PR for this. I’ve never contributed to an open source project before and this seems like something easy for a newbie like myself.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Buttons must have discernible text | Axe Rules | Deque Systems
Screen reader users are not able to discern the purpose of elements with role="link" , role="button" , or role="menuitem" that do not have...
Read more >Lighthouse error: "Buttons do not have an accessible name"
It suggests that the button should have inner text content or an aria-label or aria-labelledBy. <button class="search-button" type="submit"> ...
Read more >Button has non-empty accessible name | ACT Rule | WAI - W3C
Description. This rule checks that each button element has a non-empty accessible name. Applicability. This rule applies to elements that are included in ......
Read more >Technique: Accessible names for buttons
Accessible names are the labels given to HTML elements that can be announced in assistive technologies such as screen readers. They may or...
Read more >button-name - Accessibility Insights
Assistive technologies can then refer to the object by name, not just by type. When a button doesn't have an accessible name, people...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wildpow Snapshot tests are just “snapshots” of what the component tree should look like to pass a particular test. If you scroll up, you’ll see the diffs for all 10 failing tests, and they pretty much all look similar to this:
All 10 are failing because previous snapshots didn’t have those role & aria-label attributes you added. You’ll need to update all those tests using
npm test -- -u
, then commit those updated snapshots along with your code changes.PR: https://github.com/leandrowd/react-responsive-carousel/pull/275