Prev/Next buttons need discernible text
See original GitHub issueThe previous and next buttons in Spectacle are real buttons, so great job there! That means keyboard users can operate them. But for screen reader users, the fact that those buttons consist only of an SVG graphic with no title or label means they aren’t accessible. I always post my slides online for everyone after I do a talk, so this would prevent me from sharing Spectacle slides.
If I get time to do a PR I will, but I’m under a huge deadline to finish my talks! So I figured I’d at least log the issues here as I find them.
To fix the button text, the simplest thing to start would be to add “Previous slide” and “Next slide” to the elements. There are a few ways to accomplish that, but here are my recommendations:
- Use
aria-label
on the buttons with the text “Previous slide” and “Next slide” - Add
role="presentation"
onto the SVG inside, so it is indicated as visual presentation only. - Add
focusable="false"
onto the SVG inside to make IE11 happy.
<button aria-label="Previous Slide" type="button" data-radium="true" style="position: absolute; top: 50%; left: 20px; transform: translateY(-50%); z-index: 9999; background: none; border: none; outline: 0px;">
<svg role="presentation" focusable="false" width="32px" height="32px" viewBox="0 0 512 828.586" data-radium="true" style="fill: white;">
<path d="M512,97.707L414.293,0L0,414.293l414.293,414.293L512,730.88L195.414,414.293L512,97.707z"></path>
</svg>
</button>
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Buttons must have discernible text | Axe Rules | Deque Systems
Buttons must have discernible text that clearly describes the destination, purpose, function, or action for screen reader users. The input-button-name rule ...
Read more >Accessibility rule: Buttons must have discernible text
For screen reader users, buttons must include recognizable text that specifies the destination, purpose, function, or action.
Read more >Buttons must have discernible text - Matthew Roach
You may of come across the rule “Buttons must have discernible text” when running accessibility audits or using automated tools such as ...
Read more >Buttons must have discernible text
Buttons must have discernible text that clearly describes the destination, purpose, function, or action for screen reader users. The input-button-name rule ...
Read more >Accessibility: Buttons must have discernible text · Issue #1434
Element does not have inner text that is visible to screen readers; aria-label attribute does not exist or is empty; aria-labelledby attribute ...
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
@marcysutton just pushed out
v4.0.3
, both issues should be all set!Once I push this out, I super recommend running
create-react-app presentation-name --scripts-version spectacle-scripts
, and then pasting into there. You’ll get a service worker which helps present in bad network conditions if you have to from the web.