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

NVDA does not announce dialog role when dialog is focused #8620

Open
scottaohara opened this issue Aug 12, 2018 · 15 comments
Open

NVDA does not announce dialog role when dialog is focused #8620

scottaohara opened this issue Aug 12, 2018 · 15 comments

Comments

@scottaohara
Copy link

Steps to reproduce:

Open Firefox ESR, FIrefox 60+, or Chrome latest and go to https://codepen.io/scottohara/full/yqwNQa/

Navigate to the Open Dialog button and activate it to reveal the dialog and programmatically move focus to it.

The dialog has a role="dialog" and accessible name indicated by an aria-labelledby pointing to the h2 within the dialog. It matters not if aria-label is used instead of aria-labelledby.

<div role="dialog" aria-labelledby="ex" tabindex="-1">
  <h2 id="ex">example</h2>
  ...
</div>

Actual behavior:

NVDA will announce "Example. heading level 2, example ..." and then begin to announce the other content within the dialog as expected.

Expected behavior:

NVDA should have announced the dialog role, which would have resulted in hearing:
"Example, dialog. heading level 2, example ..."

Testing with VoiceOver (mobile and desktop), JAWS 18 & 2018, TalkBack and narrator, the same test case will announce the accessible name and role of the dialog, when the dialog is focused.

Testing with NVDA 2018.2 and IE11, the dialog role is announced when focus is placed on the dialog element.

System configuration:

NVDA Installed/portable/running from source:

installed

NVDA version:

2017.4, 2018.1, 2018.2.1

Windows version:

Windows 10 Pro
10.0.17134

Name and version of other software in use when reproducing the issue:

2018.1, 2018.2.1 tested with Chrome (latest), Firefox 63 (Nightly) & Firefox ESR
2017.4 had been tested with Firefox ESR and the latest version of Chrome in January - February 2018.

Does the issue still occur after restarting your PC?

Yes

Have you tried any other versions of NVDA?

Not beyond the ones mentioned

@jscholes
Copy link

With the latest release versions of Chrome and Firefox, NVDA 2018.2.1 does not speak the dialog role (as reported). With the latest alpha build of NVDA (alpha-15781,d58e1cd4) the dialog role is reported as expected so this seems to have been fixed. You can download the alpha snapshot in question here.

@scottaohara
Copy link
Author

Hi @jscholes

Downloaded the alpha snapshot you linked and tried again, but the dialog role is still not being announced? Aside from downloading the update, is there anything else I'd need to do?

@jscholes
Copy link

jscholes commented Aug 12, 2018

I've just launched the snapshot with default NVDA settings and, you're right, the dialog role still isn't announced. I'm not sure yet which setting(s) I've modified in my own personal config to change the behaviour.

@jscholes
Copy link

Update: the dialog role is announced if the "Automatic Say All on page load" setting is turned off in NVDA's browse mode settings. The setting is enabled by default. @@michaelDCurran or @feerrenrut - is this expected behaviour?

@scottaohara
Copy link
Author

Again, thank you for looking into this @jscholes.

As a quick follow up test, I created this codepen to compare focus announcements.

results:
sending focus to a h1 will have the heading role and level announced
sending focus to a role="main" or <main> element will announce "main landmark"
sending focus to a role="dialog" announces no role.
sending focus to a button announces the button role.

I could go on, but the point being that other elements will announce their role when focused with default NVDA settings. So it seems odd that the dialog role needs setting to be modified to be announced.

@bethwhitmer
Copy link

I agree that I would expect the dialog role to be announced by default by NVDA when the dialog is focused.

@scottaohara
Copy link
Author

Commenting just for tracking purposes, but the issue still exists in 2018.3.2

@Adriani90
Copy link
Collaborator

@scottaohara this should be fixed in NVDA 2019.3 Beta 2. I am testing in Chrome 79 and Firefox 72 and in both cases the dialog role is announced. Enablind or disabling "read all after page load" does not make any difference here.
Can you confirm?

@scottaohara
Copy link
Author

re-testing with the test case i included with my original issue, the dialog role doesn't get announced with Firefox 72. It's not announced when using Chrome either, unless i close the dialog and then re-open it.

@Adriani90
Copy link
Collaborator

Cc: @jcsteh

@Adriani90
Copy link
Collaborator

Ok, this is only reproducible when "read page after page load" is enabled in NVDA's settings under browse mode settings.

@jscholes
Copy link

@Adriani90 as already indicated in #8620 (comment). I should also point out that if the referenced setting is enabled, NVDA doesn't announce the accessible role of a standard web page as "document" either.

@jscholes
Copy link

This behaviour is codified, whether intentionally or not, within the speech.getPropertiesSpeech function. It explicitly determines that an object's role should not be announced if the reason for speaking that object's properties is a say all.

When the "Automatic Say All on page load" setting is enabled, this logic path will be used, and the role will never be inserted into the speech sequence. This seems like a mistake, or at the very least something which was implemented for a good reason without the circumstances behind this ticket being predicted.

@jscholes
Copy link

As an aside, how do we all feel about an automatic say all applying to dialogs in the first place? The setting is called, "Automatic Say All on page load", but a modal is not a new page (or a page full-stop).

@DanHolbrookQA
Copy link

Commenting for tracking purposes, issue still occurs (and is still tied to "Automatic Say All on page load" as noted by Adrian) in 2023.1.0.27913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants