question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prev/Next buttons need discernible text

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kenwheelercommented, Nov 14, 2017

@marcysutton just pushed out v4.0.3, both issues should be all set!

0reactions
kenwheelercommented, Nov 14, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found