indiana-university / rivet-react

Rivet React Component Documentation and Style Guide:
https://indiana-university.github.io/rivet-react/
Other
5 stars 5 forks source link

Using "role" as prop name conflicts with ARIA attribute #448

Closed athill closed 1 month ago

athill commented 1 month ago

The Badge and Button components both have a role prop that can take the value "secondary". When linting with the jsx/a11y plugin, this results in the following error:

 error  Elements with ARIA roles must use a valid, non-abstract ARIA role

We should change the name of this prop in these components to something that does not conflict. Maybe rivetrole?

burnumd commented 1 month ago

I think changing it to something like type may be the simplest change here. I worry that rivetrole may get confused with an ARIA role specific to Rivet.

burnumd commented 1 month ago

I opened a PR using modifier as the prop since that's what we actually use in Button (though its PropType calls it role).

iu-deployer commented 1 month ago

:tada: This issue has been resolved in version 2.0.0-beta.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket: