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

a11y issue with ui5-panel when accessible-role="Region" and aria-labelledby provided

Open Ankitadoshi opened this issue 5 years ago • 2 comments

Describe the bug When using ui5-panel with custom header, aria-labelledby attribute and accessible-role as "Region", a div with role as "region" get created but the aria-labelledBy attribute is not passed to it. So those regions are missing accessible names. ie the aria-labelledby is only present on the UI5 tag and not on the div with role="region" and hence these regions are not recognised with accessible names by both NVDA and JAWS

To reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/ui5-webcomponents-forked-x3k7l?file=/index.html
  2. Turn on NVDA screen reader and open the Element dialog (NVDA+f7)
  3. Go to landmarks tab and see that the region does not have accessible name

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

Expected behavior aria-labelledby needs to be present on the div with role="region" for them to be recognised by screen readers with a name.

Screenshots If applicable, add screenshots to help explain your problem.

Context

  • UI5 Web Components version 0.29.6
  • OS/Platform: NA
  • Browser (if relevant): NA
  • Other information: {...}

Affected components (if known) ui5-panel

Organization: (if applicable) Success Factors

Priority: (optional) (Low, Medium, High or Very 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:

  • Breaks entire application or system - High and Very High
  • Is accessibility one (Screan Reader, Keyboard Handling) - Medium and High
  • Is functional one and makes a single component unusable - Medium and High
  • Is visual, styling one - Low and Medium

Note: the priority would be re-evaluated by the issue processors, according to the project internal criterias

Business impact: (mandatory for "Very High")

Ankitadoshi avatar Mar 26 '21 10:03 Ankitadoshi

Hello @SAP/ui5-webcomponents-topic-rl can you please check this accessibility issue with the ui5-panel

kskondov avatar Mar 26 '21 11:03 kskondov

Hello @Ankitadoshi ,

In order to provide an accessible name to the element with role region, you could use the accessible-name property which is applied to the element with accessible role. You can check it here: https://sap.github.io/ui5-webcomponents/master/playground/components/Panel/

The aria-labelledby support was previously available for a while, but it lead to a repetitive speech output: When focusing an element which has an aria-labelledby attribute on custom element level and this aria-labelledby is passed to the root element with the accessible name, the screen reader would read the label twice. You can have more information regarding the new property and the decisions made here: https://github.com/SAP/ui5-webcomponents/pull/2860

elenastoyanovaa avatar Mar 30 '21 08:03 elenastoyanovaa