-
Notifications
You must be signed in to change notification settings - Fork 789
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
False positive: 'Nested-interactive' rule fails despite no negative impact with screens readers or speech recognition software #3300
Comments
Can you explain what these examples intend to demonstrate? I'm seeing a good deal of problems here TBH. For starters, a very confusing accessibility tree. Here's what it looks like in Firefox:
These are exactly what the rule says they are; nested interactive elements. You have a button inside another button. Both of them can be accessed by screen readers. This is a very unintuitive thing about how tabindex and role=presentation work. But role=presentation only works on element that 1. are not focusable, and 2. don't have a global ARIA attribute. In this case, both those button elements are focusable, so role=presentation doesn't work. As for why they are focusable, this is because tabindex="-1" does not turn off focus. It removes the element from sequential focus navigation, but if you click the element, target it with an anchor, or call .focus() on it with a script, that element becomes. Assistive technologies can focus elements with tabindex="-1" too. There are a few attributes that turn off focus on natively focusable elements. |
@WilcoFiers The examples here show I tested the examples with the following ATs/browsers in both modes and could not find any negative user impact:
So based on the testing and due to lack of finding any user impact from the end user perspective on the current examples in the current state, I feel failing failing this rule with the current failure messages is not appropriate. This would feel like a false positive as I see a message saying May be it is worth checking if new failure messaging needs be added or if a few failures need to be made We also understand that this is a parsing violation but this rule does not reference that. |
@iamrafan There are several ways to get both to the outer button, and the nested one. In Safari+VO for example, if you use tab navigation you get to the outer button, and if you use reader mode you can get to the inner button. Your colleague @scottaohara recently got involved in this too, arguing in favour of keeping this part of the rule in: I get that this pattern seems like it should work, but the spec don't allow it, and screen readers don't handle it well. |
Yeah. Really wish it wasn't a problem. It's counter-intuitive, and hard to explain. But it's an issue. Thanks for weighing in Scott. |
The
nested-interactive
rule fails on the following example despite tests with screen readers and Dragon showing no negative user impactDemo: https://codepen.io/iamrafan/pen/KKvJywR
Product: axe-core
Expectation: Not fail
nested-interactive
rule/fail a different ruleMotivation:
nested-interactive
rule says such usages should be avoided to prevent problems when using assistive technologies, but testing with screen readers and Dragon showed no user impactThe text was updated successfully, but these errors were encountered: