You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SVG + JS pseudo element used as described by docs. Role of img applied when fontawesome switches out for svg icon but attributes missing aria-hidden="true" & focusable="false". This flags as an issue when testing for accessibility. Flagged as impact: Serious.
shaundona-design
changed the title
Bug: Pseudo accessibility attributes missing
Bug: Pseudo icons accessibility attributes missing
Dec 10, 2024
shaundona-design
changed the title
Bug: Pseudo icons accessibility attributes missing
Bug: Pseudo icons accessibility attributes missing when using SVJ + JS solution
Dec 10, 2024
Thanks @shaundona-design for letting us know about the issue. Are you using a Kit or hosting Font Awesome locally in your project? Did you perhaps turn off Auto Accessibility?
We will soon release an update that will set aria-hidden="true" for icons without an explicit aria-label. We won't add the focusable="true" as that is an attribute from the SVG Tiny 1.2 spec, and aria-hidden will prevent focus. You can always manually add a tabindex if you want to explicitly enable or disable focus regardless.
Hi @RoelN we are using a kit (Font Awesome CDN ). Keen to keep the auto accessibility feature switch on. Not needing focus to be set to true, as we don't require the icons to be picked up by the screen reader. Look forward to testing once you have released an update and appreciate you folks addressing this.
###
Bug descriptionSVG + JS pseudo element used as described by docs. Role of img applied when fontawesome switches out for svg icon but attributes missing aria-hidden="true" & focusable="false". This flags as an issue when testing for accessibility. Flagged as impact: Serious.
Reproducible test case
No response
<svg data-fa-pseudo-element="::after" data-prefix="fas" data-icon="f08e" class="svg-inline--fa fa-f08e" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"></path></svg>
Screenshots
No response
Font Awesome version
v6.7.1
Serving
Font Awesome CDN
Implementation
SVG+JS
Browser and Operating System
Web bug report checklist
The text was updated successfully, but these errors were encountered: