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

A11Y issue with ui5-icon when role="presentation" or aria-hidden="true" provided

Open mrmabo opened this issue 5 years ago • 4 comments

Describe the bug We want to add role="presentation" or aria-hidden="true" so that icon should not read for screen reader. Scenarios: With screen reader ON, when dialog window is opened focus is set on entire dialog box and is announced as 'Warning Warning dialog window'.

To reproduce

  1. Go to https://codesandbox.io/s/ui5-webcomponents-forked-fippv?file=/index.html
  2. Add role="presentation" or aria-hidden="true" on ui5-icon
  3. Open the screen reader like JAWS and hit the open dialog, when dialog window is opened focus is set on entire dialog box, the screen reader JAWS will announce "warning" twice.

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

Expected behavior Once we add role="presentation" or aria-hidden="true" on , the screen reader don't announce anything for icon.

Screenshots NA

Context

  • UI5 Web Components version 0.29.6
  • OS/Platform: Window
  • Browser (if relevant): Chrome
  • Other information: NA

Affected components (if known) ui5-icon

Organization: (if applicable) SuccessFactor

Priority: (optional) (Low, Medium, High or Very High) High

Setting priority would indicate the importance of the issue and would help the process of dispatching and processing.

To set the appropriate priority, you need to consider the impact and if the issue:

  • Is accessibility one (Screan Reader, Keyboard Handling) - High

mrmabo avatar Mar 29 '21 16:03 mrmabo

Hello @mrmabo isn't this the same as https://github.com/SAP/ui5-webcomponents/issues/2383

ilhan007 avatar Mar 29 '21 17:03 ilhan007

@ilhan007 Thanks for your reply. This isn't the same as #2383

mrmabo avatar Mar 29 '21 18:03 mrmabo

Hello @SAP/ui5-webcomponents-topic-p,

I've discussed this issue with our accessibility expert @ghristanov.

The current issue is similar with #2383 as in both use cases, the wanted behavior is that the screen reader wouldn't announce the icon. There are two possible solutions identified. One as proposed will be to add both role="presentation" and aria-hidden="true" to the icon (decorative mode). The other would be to refer in "aria-labelledby" the header title only and not the whole header part of the dialog element as it is currently.

Could you look into the issue further. For more details please contact @ghristanov.

Best Regards, Boyan

unazko avatar Mar 30 '21 09:03 unazko

Hello @mrmabo,

I've tested your codesanbox example with aria-hidden="true" set to the ui5-icon and upon openning the dialog the text "Warrning" is only read out once from the h2.

image

Could you please test again on your side and if the issue is still reproducible provide more information on how to reproduce it ?

Kind Regards, Dobrin

dobrinyonkov avatar May 27 '21 07:05 dobrinyonkov