Templarian / MaterialDesign-React

Dist for Material Design Icons React Component for JS/TypeScript
https://materialdesignicons.com
MIT License
139 stars 20 forks source link

Change/Disabled role in svg icon #63

Open SergeyWebDeveloper opened 2 years ago

SergeyWebDeveloper commented 2 years ago

Thanks for the library. I would like to ask how you can change the role of the svg icon. At the moment I am using react testing library for tests and it turns out not entirely correct that I am looking for the role of the presentation in the test and the icon is. I can use the title to remove the role, but this behavior is also not entirely correct for me. Thanks!

Templarian commented 2 years ago

@SergeyWebDeveloper Can you please link to accessibility documentation where this wouldn't be the correct behavior?

If you're using the <Icon /> component for something other than icon's that might be outside of the scope. In this case the only role is presentation or a title/description must be defined.