-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to override the role
attribute.
#14791
Comments
Thanks @justin-schroeder ! We'll get it rolling. |
😄 no pun intended i'm sure. |
That was intended! But you caught it 👏. My kids would say the appropriate response is 🙄 |
Any word on this issue? It seems to still be behaving the same way. Also affecting the react version. |
This should have been fixed in version 5.8.2 I can see it is fixed by changing the Font Awesome version in the reproducible test case (https://codepen.io/justin-schroeder/pen/NJeMGV) Could you please provide a reproducible test case? (labeling and closing here, but feel free to comment, I will reopen if it is the case) |
From the example in #14791 (comment) Isn't it supposed to be |
@joewhitsitt I just updated my codepen to 5.8.2 and saved it so the next person can see its been fixed too 👍 |
Good, thanks for the feedback |
Describe the problem
When using the Font Awesome SVG with JS it is not possible to override the
role
attribute. Given the following:Font Awesome converts this into:
Specifically the issue is
role="img"
was not overridden even thoughrole="presentation"
was defined on the icon.What did you expect?
role="img"
to be replaced withrole="presentation"
.Ideally,
<i>
tag attributes would take precedent over attributes being injected on the svg. Most of them do, but to my knowledge at least therole
attribute does not transfer.What version and implementation are you using?
Version: 5.3.1
Browser and version: Chrome, safari, firefox
Reproducible test case
https://codepen.io/justin-schroeder/pen/NJeMGV
Pretty simple test case, you'll see role="presentation" is not being overridden, and I've broken out all the existing attributes on the element for easy viewing.
The text was updated successfully, but these errors were encountered: