fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Rating component on swipe gesture reads the ariaLabelFormat text but does not change fill color while on right-left arrow it does

Open dipgupta-msft opened this issue 6 years ago • 39 comments

Environment Information

  • Package version(s): ^7.150.0
  • Browser and OS versions: Chrome and Android + Windows

Describe the issue:

Rating component is used in one of our UI page which is used both for Android and Web versions. For Android, the page is displayed under the app as a webview.

For Web version on Edge:

  • With narrator on and moving across star ratings using CapsLock + right/left arrow keys, the star icon gets filled. The narrator is able to announce the text referred in ariaLabelFormat.

For Android:

  • With Accessibility on and moving across star ratings using swipe left/right, the focus does shift accordingly. The narrator is able to announce the text referred in ariaLabelFormat but the star icon does not change its fill state.

We can replicate the same behavior on a touch-based laptop and Edge (Chromium based browsers) as it is possible to simulate touch gestures in Chromium based browsers. Reference: https://stackoverflow.com/questions/36877041/how-to-simulate-touch-gestures-in-browser-preferably-chrome

Please provide a reproduction of the issue in a codepen:

https://codepen.io/dipgupta-msft/pen/bGwbBKd

Actual behavior:

On swipe gesture, the star icon does not get filled but narrator announces the ariaLabelFormat giving a notion that the star is selected.

Screenshot for Web: Rating-web-behaviour-on-right-arrow-edge

Screenshot simulating swipe gesture: Rating-Mobile-Narrator-Swipe-edge

Expected behavior:

On Swipe gesture, the star icon should also get filled to be in line with what narrator is announcing as read by ariaLabelFormat.

dipgupta-msft avatar Nov 24 '20 20:11 dipgupta-msft

@dipgupta-msft thanks for filing this. Just so I understand correctly, is the issue that when navigating by keyboard the stars get filled in as navigation occurs, however, when navigating with just the screen reader the stars are not filled in?

If so I'm not sure this is fixable, I don't think we can or should have the UI respond to screen reader navigation, the main purpose there is that the screen reader can read the screen without changing it. This would be the same as using scan or browse mode in a desktop screen reader.

JustSlone avatar Dec 03 '20 03:12 JustSlone

@JustSlone : Thank you for taking up this issue for discussion. From the behavior point of view and touch-based devices (like Android) what is happening is:

  • When we have talkback on, the way we move across components is by a right-swipe.
  • When we are on the rating component, if we do a 'right-swipe', the narrator is able to announce "Selected 2 of 5 stars" (in case the you have swiped two times and there are in total 5 stars).
  • But the fill-color still does not change. It is only when we double-tap on it (because the talkback is on) we are able to see the icons getting filled.

To my understanding, the behavior is not analogous to keyboard navigation where on using right-left arrow keys, the icon fill color does change.

dipgupta-msft avatar Dec 03 '20 12:12 dipgupta-msft

Yep, I agree that the behavior while swiping on talkback is not the same as keyboard and that the stars should not fill (actually I don't think we could even respond to talkback focus on the element).

Actually really this behavior seems similar to how Narrator/NVDA operate in scan/browse mode where the screen reader moves around the screen and does not cause any focus events. It seems like the swiping in Talkback/VoiceOver is similar to this mode. See this gif for how NVDA behaves in browse mode. raiting

As for the misleading announce. It's actually announcing "Select 2 of 5 stars" to let the user know that this button will allow them to Select 2 of the 5 stars. It seems like that's a reasonable announce?

JustSlone avatar Dec 06 '20 04:12 JustSlone

The core problem here is the

Interesting idea around using radio group to implement this. I'm not sure about the reading of "radio button" for each star, it seems redundant, but reading the checked/not checked state seems to be an improvement.

This could be something we look at when we refresh the rating component, it's too big for us to take on right now. @petewu100 if you are interested in contributing to rating to make it better, we could setup some reviews of this method to make sure it would work, then review the change. It would have to be for the next major release though, as this would certainly be a breaking change to the ratings component.

Here's a Gif of the prototype with NVDA for the sake of others. Rating-NVDA

JustSlone avatar Dec 08 '20 21:12 JustSlone

Thank you for taking a look at the radio button approach, JustSloan.

In the near term, a small change you could make to improve the experience is to add aria-pressed to each

@petewu100 that seems like a reasonable short term fix, as long as it doesn't negative affect the screen reader experience for existing users of the rating component. If you or @dipgupta-msft are interested in a spinning up a PR with this change I can find someone to review it.

Note, folks will be out for the holidays soon, so it might not get reviewed until January.

JustSlone avatar Dec 16 '20 16:12 JustSlone

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot

:tada:This issue was addressed in #17267, which has now been successfully released as @fluentui/[email protected].:tada:

Handy links:

msft-fluent-ui-bot avatar Mar 18 '21 20:03 msft-fluent-ui-bot