nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

aria-describedby not reported for group in browse mode #12718

Open scottander opened 3 years ago

scottander commented 3 years ago

Steps to reproduce:

Add a containing div with role=group Add aria-labelledby and aria-describedby attributes Add child inputs of type checkboxes

In Chrome and and NVDA (2021.1):

Reproduced in: https://codepen.io/scander/full/zYwmMeL

NOTE: If you change the child inputs to radio, I observe my expected behavior.

Actual behavior:

aria-labelled by content is reported by NVDA aria-describedby by content is not reported

Results using Firefox and and NVDA (2021.1):

main landmark frame Gender grouping Male check box not checked
Female check box not checked

Results using Chrome and and NVDA (2021.1):

main landmark frame Gender grouping Male check box not checked
Female check box not checked

Results using Edge and NVDA (2021.1):

main landmark frame Gender grouping Male check box not checked
Female check box not checked

Expected behavior:

aria-labelled by content is reported by NVDA aria-describedby by content is reported by NVDA

NVDA speech viewer output something like this:

main landmark frame Gender grouping Male check box not checked Description Female check box not checked

System configuration

NVDA installed/portable/running from source:

NVDA installed

NVDA version:

2021.1

Windows version:

Windows 10 19043.110

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

Firefox

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

No

If add-ons are disabled, is your problem still occurring?

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

feerrenrut commented 3 years ago

Please update the description with the exact steps you take to test this with NVDA and exact output you actually get and expect to get. You can use the speech viewer to make this easier. This helps to ensure there is no confusion about the expectations.

Using Edge and NVDA (2021.1), I have briefly run through this example in browse mode using down arrow. NVDA spoke all of the information (including "description"), from speech viewer:

main landmark    frame    clickable  grouping    Gender
Description
check box  not checked    Male
check box  not checked    Female

So far I believe this is the expected behavior, when an element used as the description or name appears in the DOM (and is visually rendered) it is spoken in document order. This prevents situations where information may be duplicated, and presents the page more consistently with the experience of a sighted user.

scottander commented 3 years ago

Hi @feerrenrut thanks for the reply. Yes I would consider the behavior you are seeing to be correct. Unfortunately that does not appear to be the result I am seeing. (I have also reproduced the same behavior on at least one other Windows PC).

feerrenrut commented 3 years ago

@scottander could you expand the "Steps to Reproduce" to contain the exact method you use (ie which keys you press), what you hear at each stage?

scottander commented 3 years ago

@feerrenrut Sure, added.

feerrenrut commented 3 years ago

Can you please confirm the setting? NVDA Settings -> Object Presentation category -> Report object descriptions check box

scottander commented 3 years ago

Hi @feerrenrut confirming that

Settings > Object Presentation > Report object descriptions

is checked during my tests. Thanks for looking into this.

feerrenrut commented 3 years ago

Thanks for checking that. At this stage I'll need to ask for a debug level log. Please restart NVDA with debug logging enabled, reproduce the issue, and save the log using the log viewer (NVDA+n, tools, view log, ctrl+s)

scottander commented 3 years ago

No problem, here is the log @feerrenrut:

nvda.log

feerrenrut commented 3 years ago

From the log:

IO - speech.speech.speak (07:29:54.172) - MainThread (772):
Speaking [LangChangeCommand ('en_US'), 'navigation landmark', 'User Menu', 'menu button', 'collapsed', 'subMenu', 'User Menu']
IO - inputCore.InputManager.executeGesture (07:29:54.534) - winInputHook (34468):
Input: kb(desktop):tab
IO - speech.speech.speak (07:29:54.633) - MainThread (772):
Speaking [LangChangeCommand ('en_US'), 'main landmark', 'frame', 'Gender', 'grouping', 'Male', 'check box', 'not checked']
IO - inputCore.InputManager.executeGesture (07:30:05.892) - winInputHook (34468):
Input: kb(desktop):tab
IO - speech.speech.speak (07:30:05.998) - MainThread (772):
Speaking [LangChangeCommand ('en_US'), 'Female', 'check box', 'not checked']

When I last tested this I had to assume navigation with down arrow, from the log I note navigation is by pressing tab.

Testing again with speak command keys on to show the keys pressed: Browse mode:

navigation landmark    User Menu  menu button  collapsed  subMenu    User Menu
tab
main landmark    frame    clickable  Gender  grouping  Male  check box  not checked

Focus mode:

User Menu  menu button  collapsed  subMenu  User Menu
tab
main landmark
CodePen - aria described-by test  document   
Gender  grouping  Description
Male  check box  not checked

With down arrow in Browse mode:

down arrow
main landmark    frame    clickable  grouping    Gender
down arrow
Description
down arrow
check box  not checked    Male
down arrow
check box  not checked    Female
feerrenrut commented 3 years ago

I believe the behavior with tab is expected, since in this case NVDA is reacting to a change in focus. It does not read out all text skipped over.

Note that in this test case description is read because it is text that appears on the page, not because it is aria-describedby. Typically aria-describedby maps to accDescription (IA2), there are however many other sources for accDescription, some of which produce excess verbosity for screen reader users, such as the title attribute. Historically, there wasn't a standard way to differentiate between different sources of accDescription (in web browsers). This is changing, and we will be exposing aria-description in all cases. It may later be considered for aria-describedby.

As for the difference in behavior with radio buttons, I would have to look at the exact sample.

feerrenrut commented 3 years ago

Thanks for your patience @scottander We've discussed this internally. Contrary to what I said in my last comment, the case with browse mode and pressing tab should be considered a bug.

We also looked at radio buttons. When tabbing to a radio button, focus mode is automatically activated so that you can then use the arrow keys to change the selected radio button. In focus mode the description is read correctly.

Technical starting point:

scottander commented 3 years ago

thanks for the updates @feerrenrut

walterebert commented 1 year ago

Related issue #11617

Adriani90 commented 1 year ago

This issue is also reproducible when pressing x to jump to the first check box in browse mode, so it does not apply only to tab navigation in browse mode.

since the aria_describedby atribute is set on the group role and not on the input checkbox, I expect NVDA to report the description any time when i enter the group by what ever navigation mode or navigation key.

cssinate commented 1 year ago

I've just put together a second example. The difference between my example and the original poster's is mine also has a fieldset that isn't checkboxes included so the two behaviors can be contrasted. Both fieldset examples were copied directly from the the gov.uk design system documentation.

https://codepen.io/cssinate/pen/oNaoegZ

Adriani90 commented 11 months ago

cc: @jcsteh maybe at least this can get some attention from Firefox side. However I think it is an NVDA related issue, maybe we should provide a reporting of "has description" when entering the group, and the description could be envoked via nvda+d command at any point in time as long as the virtual cursor or the system focus is placed any where in the group. This would at least prevent the situations where the description is very long and produces noisy verbosity.

jcsteh commented 11 months ago

There's nothing that can be done in Firefox. The group description is being exposed correctly. NVDA is just choosing not to report it.

Adriani90 commented 11 months ago

I can imagine that it becomes very verbose in browse mode if all the descriptions were reported. An alternative solution could be to implement a sound via speech refactor which indicates in browse mode or when using the mouse, when entering and leaving a grouping or container with aria describedby. In this case the user would know there is a description and could invoke it with the key stroke. cc: @michaelDCurran

basher commented 4 days ago

I'm experiencing inconsistent behaviour with NVDA reporting aria-describedby used on a <fieldset> in "FOCUS MODE", in both Firefox and Chrome... depending on whether the controls are checkboxes or radio buttons.

The HTML patterns I'm using are based on these 2 examples from GOV UK:

1. Checkboxes

https://design-system.service.gov.uk/components/checkboxes/default/

1st checkbox is announced without the aria-describedby content:

Which types of waste do you transport? grouping clickable check box not checked

2. Radio buttons

https://design-system.service.gov.uk/components/radios/hint/

1st radio is announced with the aria-describedby content, on both the <fieldset> and the radio <input>:

How do you want to sign in? grouping You’ll need an account to prove your identity and complete your Self Assessment Sign in with Government Gateway radio button not checked You’ll have a user ID if you’ve registered for Self Assessment or filed a tax return online before

NVDA version:

Capture