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.

Icon - aria-hidden="true" applied when as="a" is specified

See original GitHub issue

Steps

<Icon
  name="point"
  as="a"
/>

OR

<Icon
  name="point"
  as="a"
  aria-hidden={false}
/>
<Icon
  name="point"
  as="a"
  aria-hidden="false"
/>

Expected Result

<a
  class="point icon"
>
</a>

Actual Result

<a
  aria-hidden="true"
  class="point icon"
>
</a>

Version

0.78.3

Testcase

https://codesandbox.io/s/qq2vr3x2qj

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fracmakcommented, Mar 16, 2018

This is an interesting problem, because there’s no text content related to icons, they should be hidden, even if they are an anchor. What would probably be better is not to show aria-hidden if an aria-label is applied to the icon.

0reactions
fracmakcommented, Mar 20, 2018

@benbakhar correct, I’m hesitant to recommend the label=“” route because other components explicitly use aria-label and we should be consistent. It’s also good documentation to place aria-label on a component so people reading it know what it’s doing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aria-hidden - Accessibility - MDN Web Docs - Mozilla
The aria-hidden state indicates whether the element is exposed to an accessibility API.
Read more >
Using aria-hidden=true on an icon font that AT should ignore
The objective of this technique is to show how to make icon fonts that are pure decoration be ignored by assistive technology. Icon...
Read more >
Understanding the use of aria-hidden - HTML & CSS - SitePoint
If your icon is purely decorative, include a aria-hidden='true' attribute. aria-hidden should only be used when you really want to hide the svg ......
Read more >
aria-hidden elements do not contain focusable elements
By adding aria-hidden="true" to an element, content authors ensure that assistive technologies will ignore the element. This can be used to hide decorative ......
Read more >
Untitled
Presentations were given by IGFA Chief of Staff Jack Vitek and Conservation ... aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" ...
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