Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

role="alert" with div element is read twice #6680

Closed
tapanbasak opened this issue Dec 26, 2016 · 5 comments
Closed

role="alert" with div element is read twice #6680

tapanbasak opened this issue Dec 26, 2016 · 5 comments

Comments

@tapanbasak
Copy link

When role="alert" is added to a div element, inner content is reading twice by NVDA reader (version >=2016.1) with IE11 browser. In chrome it is working fine as expected. For example -
<div class="validation-message-danger" style="display:none;" role="alert" id="c3text_err_1_inline_minLength">This field is required</div>

When above div element is made visible, NVDA reader is reading like "This field is required alert This field is required" in IE 11 browser.

If anyone has any workaround, please suggest...

Thanks

@ehollig
Copy link
Collaborator

ehollig commented Oct 10, 2017

@tapanbasak is this still an issue with the latest version of NVDA? Do you have an example site that is demonstrating this behavior?

@Adriani90
Copy link
Collaborator

@tapanbasak are you still available?

@aloeugene
Copy link

aloeugene commented May 29, 2019

Hi @ehollig, @Adriani90,

I can say that it still reproduces for me in IE11 with NVDA 2019.1.

It reads "You have removed the item alert You have removed the item".

Code sample:

<section role="alert" aria-live="assertive">
  <img />
  <span>You have removed the item.</span>
  <button>Close</button>
</section>

babot pushed a commit to binaryage/dirac that referenced this issue Aug 25, 2020
Issue:
- The current alert function uses a workaround to avoid NVDA reading the alert message twice (NVDA bug: nvaccess/nvda#6680).
- However, understanding now that it breaks other SR program's functionality, we should implement it the correct way without working around NVDA's bug

Changes:
- Fixing implementation for ARIAUtils.alert
    - Instead of changing a description element for an alert element, we are applying the text change to the alert element directly.

Bug: 1120844
Change-Id: Ic4fc8a99a56b3ce61948c9cf91308adf0d72d30c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2368771
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
devtools-bot pushed a commit to ChromeDevTools/devtools-frontend that referenced this issue Aug 25, 2020
Issue:
- The current alert function uses a workaround to avoid NVDA reading the alert message twice (NVDA bug: nvaccess/nvda#6680).
- However, understanding now that it breaks other SR program's functionality, we should implement it the correct way without working around NVDA's bug

Changes:
- Fixing implementation for ARIAUtils.alert
    - Instead of changing a description element for an alert element, we are applying the text change to the alert element directly.

Bug: 1120844
Change-Id: Ic4fc8a99a56b3ce61948c9cf91308adf0d72d30c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2368771
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
@mattgh94
Copy link

We have the same issue in Chrome and Firefox. The fix of using aria-described by is not possible because we are using NGBModal options where only ariaLabelledBy is available. Additionally, we need the entire modal content to read and can't just set a custom aria-label for the element being used with described by. Is there any update on this issue?

@seanbudd seanbudd changed the title role="alert" with div element is reading twice by NVDA (>=2016.1) in IE11 role="alert" with div element is read twice Jul 14, 2021
@Adriani90
Copy link
Collaborator

NVDA does nothing against Aria specs here, the current behavior is intended. The span text is reported because this is where NVDA's virtual cursor lands to in browse mode, and the aria live message is reported according to aria spec.
If you load the page with NVDA in focus mode, only (uncheck enable browse mode on page load in NVDA browse mode settings), then only the aria live assertive will be reported.
What is the use case of having the same text in the span text and the aria allert live message? Why not using different information, if you want to communicate something via the aria live message?
I am closing this as invalid, ut feel free to comment on the use case and we can reopen the discussion.
@mattgh94 can you please open a new issue with exact steps to reproduce and a minimal test case for your use case? I didn't get fully the problem you describe in the last comment.

@Adriani90 Adriani90 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants