-
-
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
NVDA unable to access links in browse mode on certain web pages #16552
Comments
The divs with the links inside them need a role="link" since divs do not have semantics by default and so the link is not rendered in browse mode. |
@Adriani90 Oh, unfortunately, it seems you have misanalyzed the source code. Each content section is followed by an |
The <a> tag is wrapped into a div, so the div still needs a role. Cc: @jcsteh do I miss understandsomething here?Von meinem iPhone gesendetAm 15.05.2024 um 10:16 schrieb khsbory ***@***.***>:
Oh, unfortunately, it seems you have misanalyzed the source code. Each content section is followed by an <a href> tag. Please verify this again.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
@Adriani90 Hmm, the |
@Adriani90 A div does not need a role just to contain a href. Open the following in a browser address bar:
The link is still treated as a link. The true problem here is that the anchor element has no text content. Good: <a href="https://something" title="The title">fiction details</a> Bad: <a href="https://something" title="The title"></a> That is why these links don't render. If I add content to one of the links given in the sample page, it renders just fine, including the title. What I haven't been able to figure out--and I don't know if I'm just missing it on W3C and Mozilla, or if it's really not there--is if the text content is required by the spec. Reopening pending clarification from @jcsteh or someone with more HTML depth than I, about what the browser is actually showing. |
A link with no content will generally render with either a width of 0, a height of 0 or both, resulting in it being invisible. These do appear in the accessibility tree, but NVDA ignores them because of the 0 width/height. |
Narrator reports these links, as does Voiceover on iOS. Not sure whether that is proper behavior, but that's what happens. |
@jcsteh That's what I thought. But can that be overridden by css? I think that is what is being done here, although that's just based on the class name given on the anchor. |
"Proper" is debatable. The 0 width/height rule was implemented in NVDA a long time ago to try to remove clutter that wasn't intended to be there due to authoring error. It usually doesn't make a lot of sense for a screen reader user to interact with some element that isn't visible at all. On the other hand, the web has moved on and I've seen quite a few cases where there are 0 width/height elements, but there is an alternative visual rendering. I'd argue that this too is bad authoring, but such is life and I now suspect that the latter kind of bad authoring might outweigh the former, though I have no actual data or evidence to back this up. However, the fact that other screen readers don't apply this rule is another factor to consider. Given all of this, I personally think it might be time for NVDA to try removing this rule and see what happens. |
Sure, if you set display: inline-block or similar, you can override the width and height with CSS. But then NVDA will render the link. |
|
@khsbory What is the CSS of the " |
See also #16398. While that particular case is probably a Firefox bug (the CSS is 1px, not 0px, but Firefox somehow gets confused), this kind of quirky behaviour is becoming increasingly common due to the misguided technique of creating an accessible off-screen control which mirrors an inaccessible on-screen control. |
I could reproduce this both in Chromium and Firefox, not sure if this is related to css.
The link has a title, but this seems not to be rendered in browse mode. |
However I guess the div needs also an onclick event to work properly. |
I think NVDA has some real problems in handling divs in browse mode. This issue is for example related to #15109. The child button inside the div is not rendered in browse mode, but the link is rendered because the div has the coresponding role: |
@jcsteh as far as I understand mdn, accessible divs with interactive child elements should have a role and an onclick event. But I might be wron here. |
As others have said, the problem is that the link has no content and it is rendered as 0-width, 0-height. However, this pseudo-link has also another (empty) content through an ::after pseudoelement which is absolutely positioned to create an invisible clickable layer that extends to the full width and height of its parent div (specifically, to its first relatively-positioned container). The CSS for that pseudoelement is the following: .stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
content: ""
} The code is certainly a bit strange, but according to the accessible name calculation algorythm, and since the link has no aria-labelledby, nor aria-label, nor real content, the title should probably act as a fallback to provide the accessible name for the link. However, I can see a big problem with that approach, because the invisible layer created by the ::after pseudoelement will "obscure" the content below it. Therefore, mouse/tactile screenreader users will be unable to read the visible content when hovering/touching it. This is a common mechanism for low vision users that rely on the screen reader to read the text, and probably also for users with reading difficulties. |
Thank you for taking a deep interest in the issue I raised. Firstly, this issue should be divided into two separate discussions:
|
Correct, but since we've established this, I don't think this needs to be discussed any further here. If anyone would like to discuss this further, please open a discussion. Thanks.
I'm inclined to agree as per #16552 (comment), but a final decision needs to be made by the core developers, at which time this issue will be triaged appropriately. Unless anyone has additional information to provide here, I would suggest that there is nothing further to discuss until that decision has been made. Thanks to everyone for their valuable input. |
Is it actually possible to check codewise whether an element with width and height of 0 has a visible equivalent or not? I agree with Jamie here we should try and see what happens if the rule is removed, maybe as an experimental option in advanced settings. cc: @SaschaCowley |
Having an advanced setting for this would be nice to mitigate risk, but that's very difficult because the vbuf code doesn't have access to settings. We'd have to pass it in when the buffer is initialised or similar, but that wouldn't update existing buffers when the setting is changed. |
No. The "visible equivalent" is completely unrelated. The author misguidedly chooses to use an invisible (0/0) element for accessibility purposes and a separate inaccessible element for visual purposes. There is absolutely no discernible relationship between them. It is bad authoring, but such is life. |
Steps to reproduce:
Actual behavior:
None of the "View Details" links are accessible using NVDA's browse mode or by pressing the Tab key. The links are read as "blank" when navigating with the Tab key.
Expected behavior:
The "View Details" links should be accessible and readable using NVDA's browse mode and the Tab key, similar to how they are accessible with other screen readers like VoiceOver on iOS and TalkBack on Android.
NVDA logs, crash dumps and other attachments:
N/A
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2024.1 or latest alpha version
Windows version:
Windows 11
Name and version of other software in use when reproducing the issue:
Latest versions of Google Chrome and Mozilla Firefox
Other information about your system:
N/A
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.
The issue persists in both NVDA 2024.1 and the latest alpha version.
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes
The text was updated successfully, but these errors were encountered: