-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Landmark label ignored if aria-labelledby
refers a child element
#11357
Comments
cc: @jcsteh may you have some thoughts on this? |
aria-labelledby
that refers an element contained inside of the landmarkaria-labelledby
refers a child element
+1 I was actually thinking "Do I need to consider telling the W3 authors of this page that their example is wrong?", because tabbing into a link in the Relieved to see this is not my misunderstanding the correct HTML/ARIA pattern, but a bug with NVDA. Forgive the following question (I am a bit of a newbie when it comes to understanding how fast NVDA devs are able to respond to issues such as this), is this likely to be fixed soon (I assume not if this issue is from 2020)? |
cc: @seanbudd, @michaelDCurran, @jcsteh this is also related to #10512 or more exactly, this is actually the symptom causing that repetition probably. |
Actually, #10512 is the opposite of this in the sense that #10512 wants less repetition, where this issue proposes that we introduce more repetition. NVDA should only avoid speaking the label of a landmark if you move directly to its label. For example, if you press down arrow to move to a heading which is both the first thing inside that landmark and also labels the landmark, NVDA will not report it. In contrast, if you tab to a button inside the landmark, the label of the landmark should be reported. Even with the test case you provided, this is the behaviour I am seeing in Firefox. I suspect this might have been fixed since NVDA 2020.1 against which this was reported. |
This is probably a duplicate of #13307, fixed in NVDA 2023.1. |
Additional testing suggests this is indeed fixed. Closing as a duplicate of #13307. |
Seems like a landmark label/name defined as
aria-labelledby
will be announced or ignored inconsistently based on:aria-labelledby
(inside or outside of a landmark)TAB
key when entering it (e.g. in my case the different behavior for links inside of lists and tablists)Steps to reproduce:
TAB
keyActual behavior:
aria-labelledby
that refers to an element contained inside of the landmark HTML element<nav>
and<section>
elements to define a landmark<h3>
element as a reference foraria-labelledby
, but it's the same case is with<span>
and/or random visible or visually hidden HTML elementaria-labelledby
that refers to an element outside of the landmarktab
in atablist
then the landmark label is announced regardless if the referred element is inside or outside of the landmarkaria-label
is used instead ofaria-labelledby
Real use-case (detailed information)
Our actual product implementation includes a header with 4 navigation menus each containing it's own visually hidden heading (for better outline, and for users who navigate by headings) e.g. "Quick access" nav, "Main" nav, sub nav, etc.. One of those menus is implemented as a tablist and others as a list of links. When navigating with a
TAB
key the tablist navigation menu does announce its landmark label/name and the other 3 menus do not. There would only announce the role "navigation landmark" without a label to distinguish from. That was confusing and also how we recognized the issue in the first place.I assume that NVDA wanted to ignore the landmark label if contained within the landmark HTML element itself. Probably to avoid duplicate announcement when navigating in virtual mode. There are a few points, in my opinion, where this might not be the best idea:
aria-label
behavior which is always announced. One would logically assume thataria-labelledby
could easily replacearia-label
retaining the same behavior - always announcing the label regardless of the position of the referenced elementTAB
key to navigate the menus, which is not so difficult to imagine, then both landmark label and actual heading announcement is skipped. In this case the trial of NVDA to avoid duplicate announcement led to not announcing anything at all (?)Expected behavior:
aria-labelledby
. It must be regardless if the referred element is outside or contained inside of the landmark HTML element as a child. Also regardless if navigating byTAB
key caused entering the landmark region first onto a link in a list of links or a tab in a tablist. The behavior should be analog to the announcement whenaria-label
is used - The label should be always consistently announced!System configuration
NVDA installed/portable/running from source:
installed
NVDA version:
2020.1
Windows version:
Windows 8.1
Name and version of other software in use when reproducing the issue:
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 addons are disabled, is your problem still occuring?
Did you try to run the COM registry fixing tool in NVDA menu / tools?
Yes
The text was updated successfully, but these errors were encountered: