FluentUI React Ratings control: when navigating with Right Arrow in Safari with VoiceOver, the number of stars announced after lags by one
Environment Information
- Package version(s): 8.40.0
- Browser and OS versions: Safari 15.0 16612.1.29.41.4 on macOS Big Sur 11.6
Describe the issue:
VoiceOver announces the wrong number of stars as you navigate with Left/Right Arrow or Control-Option-Left/Right Arrow.
Please provide a reproduction of the issue in a codepen:
- Command-F5 to start VoiceOver.
- In Safari, go to https://developer.microsoft.com/en-us/fluentui#/controls/web/rating.
- Tab until the focus is on the first Star Rating control.
- Right Arrow or Control-Option-Right Arrow.
Actual behavior:
The focus moves to the second star in the rating control, but often VoiceOver will say "1 of 5 stars".
Expected behavior:
VoiceOver to announce the correct number of stars (i.e. "2 of 5 stars").
In https://github.com/microsoft/fluentui/issues/16059 I suggested using HTML intrinsic controls () for the Star Ratings control and provided a prototype of this approach: http://petewu-dev.northamerica.corp.microsoft.com/starratings.1.htm. This problem does not repro with this prototype.
The 10MB file size limit for attachments is way, way too low. Repro videos are on Microsoft Stream:
https://msit.microsoftstream.com/video/42800840-98dc-8491-f374-f1ec3cd60f7f https://msit.microsoftstream.com/video/42800840-98dc-8491-3dc0-f1ec3cd61d08 https://msit.microsoftstream.com/video/42800840-98dc-8491-dcac-f1ec3cd6249f
@petewu100 - Thanks for filing this issue with us. To set expectations the developers will review this issue once capacity allows.
@khmakoto - Would you be able to confirm if this is a regression, or if this behavior is an issue? cc @smhigley
@gouttierre @petewu100 I spoke with @smhigley about this and this seems to be some weirdness in how VoiceOver is handling this specifically. We'll need to investigate more on what is really causing the issue here since it seems like it is reproduces exclusively in VoiceOver.
@gouttierre @petewu100 I spoke with @smhigley about this and this seems to be some weirdness in how VoiceOver is handling this specifically. We'll need to investigate more on what is really causing the issue here since it seems like it is reproduces exclusively in VoiceOver.
Thank you. It wouldn't be surprising if this is due to a Safari bug. I haven't had a chance to test on other OS/browser/screen reader combinations yet.
In general, browsers have fewer of these kinds of bugs with HTML intrinsic controls than they do with ARIA, so that is why there is a general recommendation of using HTML intrinsic controls. And in this case, it is quite feasible to use HTML intrinsic controls as shown in the prototype: http://petewu-dev.northamerica.corp.microsoft.com/starratings.1.htm. Please consider using an approach like this for a more robust experience across OS/browser/screen reader combinations.
This was fixed by a past change to Rating that updated the semantics to radios. I verified that VoiceOver on macOS is correctly reading the star numbers now.