-
Notifications
You must be signed in to change notification settings - Fork 265
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
data-fa-title-id prop is not working on FortAwesomeIcon #337
Comments
We haven't updated this component to support the new title id prop. It's on the todo list and PRs are welcome! |
When I tried to do SSR, the client will generate a different id than the server does, resulting in a warning "Prop |
@xiao-hu the idea is to explicitly set it so that snapshot tests (and SSR) have a predictable value. Why would we also need the ability to disable it? That compromises the accessibility of it. |
I still have this problem when building using SSR and Webpack 5. It works fine on Webpack 4. Edit: I just checked and it actually didn't work on Webpack 4 too 😅 If I use the new |
Hei there. |
The linked PR only applies If
I'm not sure it makes sense to provide a default value for this option though. In the react-fontawesome/src/converter.js Lines 48 to 52 in 8e50c34
|
Describe the bug
As mentioned in https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility, if we provide title and want to have snapshot testing on a component, 'data-fa-title-id' keeps it unique, instead of adding random Ids.
But this property is not working when specified on React FontAwesomeIcon component.
Reproducible test case
https://codesandbox.io/s/weathered-microservice-4g67n?file=/src/App.js
Expected behavior
Passing data-fa-title-id should keep the Id on title element in SVG, to remain unique and based on this passed prop; instead of random values.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: