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.

"Button With icon" should have aria-hidden="true" on the svg

See original GitHub issue

The icon in a “Button With icon” is purely decorative, and as such, it (the svg) should have aria-hidden="true" so that screen readers don’t try to say something about them.

Please add aria-hidden="true" to the svg element for all of the “Xxx Button With icon” examples on the Carbon Button component page.

It might be nice if there was an “Accessibility Notes” section on the Button Component page that mentioned this, i.e. something like:

  • Note: The SVG in a “Button With icon” is purely decorative, and so it should have aria-hidden=“true” to hide it from Assistive Technology such as screen readers. It does not need to have a title or desc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
emyarodcommented, Jan 21, 2019

hi @carmacleod thank you for opening up that ticket! I believe the docs require a manual build and deploy. at the moment I don’t have an exact date on when the site will be updated but I expect it to update sooner rather than later

1reaction
carmacleodcommented, Jan 21, 2019

Hi @emyarod. I opened https://github.com/IBM/carbon-components/issues/1667 to create an “icon only” example. I notice that the https://www.carbondesignsystem.com/components/button/code page is not yet updated with your fixes for this issue - when will that happen?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Button With icon" should have aria-hidden="true" on the svg
The icon in a "Button With icon" is purely decorative, and as such, it (the svg) should have aria-hidden="true" so that screen readers...
Read more >
Accessible Icon Buttons - Sara Soueidan
An icon button is an icon that triggers some sort of action on the page. More accurately, technically speaking, an icon button is...
Read more >
Day 16: Icon buttons should be labelled with aria-label
The top-right button has no accessible name, even though its SVG icon does have an accessible name of "Search place": The bottom-right button...
Read more >
Accessible SVG Icons | CSS-Tricks
<svg aria-hidden="true" ... ></svg>. There's no need to announce the icon because the label next to it already does the job.
Read more >
Accessibility: Best solution to change the icon of an <button ...
What is the better solution from an accessibility point of view if I want to change the icon ( <svg> )?. to have...
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