useRole
Adds base screen reader props to the reference and floating elements for a given role
.
This is useful to automatically apply ARIA props to the reference and floating elements to ensure they’re accessible to assistive technology, including item elements if narrowly specified.
Usage
Options
enabled | Enables the interaction. |
role | The role that the floating element should be. |
Compare
Compare to Floating UI React.