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

ui5-dialog links are read twice by screen reader #5608

Closed kwxue closed 2 years ago

kwxue commented 2 years ago

Bug Description

Screen reader reads link within anchor element of a ui5-dialog twice.

Expected Behavior

The screen reader should only read the link once.

On the ui5-dialog playground (https://sap.github.io/ui5-webcomponents/playground/components/Dialog/), if an anchor element is inserted into the DOM, the screen reader only declares the dialog and link once. However, this behavior isn't replicated in a sandbox environment. Screen Shot 2022-08-01 at 5 51 28 PM Screen Shot 2022-08-01 at 5 51 42 PM

Steps to Reproduce

  1. Go to https://stackblitz.com/edit/js-yjiktr?file=index.js with NVDA screen reader and speech viewer running.
  2. Tab focus the "Open Dialog" button.
  3. Press enter
  4. Should see the following, where the screenreader repeats the link and some other content. Screen Shot 2022-08-01 at 5 40 11 PM Screen Shot 2022-08-01 at 5 40 22 PM

Context

Priority

Stakeholder Info (if applicable)

MapTo0 commented 2 years ago

Hello @kwxue

This is due to the lack of role="application" attribute in your sample. Once you place that attribute - the issue is not reproducible.

Regards, Martin

kwxue commented 2 years ago

Hi @MapTo0,

Is there a way to keep the non-repeating behavior with role ='dialog'? With role="application", the screenreader will announce the dialog as an application.

Thanks,

Kyle