Accessibility issue: Rating component does not work with "slider" role
Open
dipgupta-msft
opened this issue 5 years ago
•
5 comments
Environment Information
Package version(s): ^7.150.0
Browser and OS versions: Edge/Chrome + Windows
Describe the issue:
The rating component provides us the capability of selecting a value from a given range which adheres to the definition of "role=slider" for Accessibility standards.
The rating component currently does not have any intrinsic role assigned within the fluent-UI component
With narrator on, providing role="slider" interferes with the navigation using arrow keys and can no longer be traversed using right/left arrow keys (or Caps+left/right arrow keys).
There are no properties supported to set the related attributes : aria-aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext, aria-orientation
Please provide a reproduction of the issue in a codepen:
https://codepen.io/dipgupta-msft/pen/wvzGYMG
Actual behavior:
slider role not supported.
Expected behavior:
slider role should be supported with related attributes aria-aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext, aria-orientation. aria-valuenow should be set as per the user selection or can be set via property methods.
Per my comment in https://github.com/microsoft/fluentui/issues/16059, I think radio buttons is a good way to represent the star ratings control as the semantics match well. http://petewu-dev/StarRatings.1.htm is a prototype of how this can be done. The