SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.48k stars 254 forks source link

[Carousel]: [a11y] aria-selected property not being set for current option #9027

Closed caroline-ferri closed 1 month ago

caroline-ferri commented 1 month ago

Bug Description

The current carousel shadowroot item with role="option" does not have property aria-selected="true". This results in unwanted screenreader announcement for more complex content. For example, when the carousel content has a button within it, the screenreader announces "Unselected" before announcing the button information which is incorrect. "Unselected" should not be announced.

Affected Component

ui5-carousel

Expected Behaviour

Carousel shadowroot content with role="option" should have aria-selected="true" when it is the current carousel item. When navigating to a button in the carousel content, "Unselected" should not be announced by screenreaders.

Isolated Example

https://codesandbox.io/p/sandbox/ui5-webcomponents-forked-jc456m

Steps to Reproduce

  1. Navigate to the following code sandbox above
  2. Using JAWS navigate to the buttons in the carousel content
  3. Notice that "Unselected" is announced when the button is tabbed to ...

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

1.24.0

Browser

Chrome

Operating System

Mac OS

Additional Context

No response

Organization

SuccessFactors

Declaration

Todor-ads commented 1 month ago

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

Could you please have a look into this?

Kind Regards, Todor