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.56k stars 267 forks source link

Avatar: [A11y]In not focusable and pressable case, the avatar should not be hidden from screen readers #3012

Closed sleric1024 closed 3 years ago

sleric1024 commented 3 years ago

Describe the bug When the avatar is not focusable and pressable (interactive = false), it should be hidden from screen readers.

Isolated Example UI5-WC-React Demo https://tr4jt.csb.app/

UI5 Demo https://sapui5.hana.ondemand.com/#/entity/sap.m.Avatar/sample/sap.m.sample.Avatar

To Reproduce Steps to reproduce the behavior:

  1. Turn on screen reader and open UI5-WC-React Demo
  2. Click the avatar. The screen reader will read 'Avatar'
  3. Open UI5 Demo
  4. Click any non-focusable avatar, the screen will not read out any texts.

Expected behavior When the avatar is not focusable and pressable then it should hide from screen readers. Expect the same behavior like https://sapui5.hana.ondemand.com/#/entity/sap.m.Avatar/sample/sap.m.sample.Avatar

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

UI5 Web Components for React Information @ui5/webcomponents version: Current Version @ui5/webcomponents-react version: Current Version Operating System: Windows Browser: Chrome

Additional context I am from SAP SuccessFactors

Lukas742 commented 3 years ago

Hi @sleric1024

Since this component is developed by the UI5 Web Components team, I have transferred this issue to their repo.

kskondov commented 3 years ago

Hello @SAP/ui5-webcomponents-topic-p could you please take a look if this is the expected behavior. Thanks and Best Regards, Konstantin

dobrinyonkov commented 3 years ago

Hi @sleric1024,

the non-interactive (interactive = false) avatar should still be accessible and available for the screen reader users. For example, when navigating in reading mode (Virtual PC cursor ON) avatar accessibility should still be read out to the users. Moreover, testing the screen reader behavior with mouse/pointer inputs (clicks) is not an ordinary approach, as the common operable approach is to use a Keyboard Interface.

Kind Regards, Dobrin