ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

A11Y issue with ui5-rating-indicator when it is inactive

Open mrmabo opened this issue 5 years ago • 1 comments

Describe the bug

Jaws will announce "To increase or decrease use the arrow keys." when ui5-rating-indicator when it is inactive. The announcement "to increase or decrease use arrow keys" and "slider" role are appropriate only if the star rating is interactive - ie if we can actually increase or decrease the rating using arrow keys which is not the case here because the star rating is static. Hence it should not have the role of "slider" as that will mislead screen reader users.

I left a comment in closed ticket (https://github.com/SAP/ui5-webcomponents/issues/2989) but no one responds, so i have to open a new ticket for same issue.

To reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/ui5-webcomponents-forked-bkucb?file=/index.html
  2. Turn on screen reader and Navigate to Rating Indicator
  3. Rating Indicator announce "To increase or decrease use the arrow keys."

Isolated example https://codesandbox.io/s/ui5-webcomponents-forked-bkucb?file=/index.html

Expected behavior Is there any way to change the role for Rating Indicator component?

Context

  • UI5 Web Components version 0.29.6
  • OS/Platform: NA
  • Browser (if relevant): Chrome Version 89.0.4389.82 (Official Build) (64-bit)
  • Other information: NA

Affected components ui5-rating-indicator

Organization: (if applicable) Success Factors

Priority: High

mrmabo avatar Apr 15 '21 21:04 mrmabo

Hello @mrmabo

I spoke with ACC experts about that, and for now we decided to leave the implementation as it is. Most people are using the application mode of JAWS but still there are some situations that the virtual cursor mode (reading mode) is used as well. In that case when going over a rating indicator, the user will not know that this is actually an indicator which breaks the ACC.

Is it possible to workaround that?

Yes, but it requires some effort and future support from your side. Examples:

  1. Extend the component and replace its renderer (using lit-html)
  2. Modify shadow dom on each rerendering (extend the element override onAfterRendering calling parent's method and modify the DOM after that)

Regards, Martin

MapTo0 avatar Apr 16 '21 12:04 MapTo0