-
Notifications
You must be signed in to change notification settings - Fork 784
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 in aria-required-children "unknown" path for child not in accessibility tree with aria-hidden="true" #3850
Comments
@dbjorge I believe these should also have Have you tested to ensure that something like <div role="menu">
<div role="menuitem">menu item Dan</div>
<div aria-hidden="true">shouldn't be flagged but is</div>
<div role="menuitem">menu item Dylan</div>
<div aria-hidden="true">shouldn't be flagged but is</div>
<div role="menuitem">menu item John</div>
</div> Still reads all the ordinals and counts for the items correctly in all ATs? Also add the We have seen interspersed items like this without a presentational role can throw off counts and reading of positional ordinals |
Thanks @dylanb , that's a good point. I've added a few test scenarios to the original repro codepen and tested them in the following AT/OS/Browser combinations:
This looks consistent with reporting this case as a false positive to me, though it would be good if someone could test against VO+iOS+Safari (I don't have an iPhone to test that case with). |
@dbjorge when you remove the item in question and just have the menu items, what are the announcements? Also, when you cycle through the items does it announce |
I added new cases E7 (menu) and E8 (list) for this. In all 5 AT combinations I tested, the announcements were identical for these cases vs E3/E5 and E4/E6 respectively (with the exception that VoiceOver will read
|
And, again, I haven't tested with VoiceOver on iOS (I don't have a test device for it). It would be good to verify that the behavior is consistent there before making a decision about the rule logic. |
I've also gone ahead and added E9 and E10, which use siblings which are both Assuming iOS Safari works similarly, this makes me think that the correct fix would be to follow the ACT rule as written and ignore all programmatically hidden owned/child items from being considered as causing failures of this "unallowed" path, even if they are focusable. A hidden+focusable item will separately cause an @WilcoFiers / @dylanb , can you confirm that this matches your expectation of what a fix should look like? |
@dbjorge Yeah, that sounds right. Let |
Perfect, thanks! Definitely agree with using |
Just ran into this false positive in the wild as well, +1 to ignoring nodes not matching @dbjorge I do not get the false positive with |
@smhigley |
Hi, I get the same error message for this code: <svg role="presentation" >
<g role="table">
<text x="10" y="10" aria-hidden="true" role="presentation">
visual text with aria-hidden="true"
</text>
<g transform="translate(0, 50)">
<g role="row">
<text role="columnheader" x="0">columnheader</text>
<text role="columnheader" x="200">columnheader</text>
<text role="columnheader" x="400">columnheader</text>
</g>
</g>
<g transform="translate(0, 100)">
<g role="row">
<text role="cell" x="0">cell</text>
<text role="cell" x="200">cell</text>
<text role="cell" x="400">cell</text>
</g>
</g>
</g>
</svg> axe violation: aria-required-children on The code works as expected in VoiceOver + Safari, JAWS + Chrome and NVDA + Edge. The text with aria-hidden is neither in the accessibility tree, nor focussable. Background: Accessible SVG line graphs Can somebody please confirm that this the same bug? Thank you very much. |
One more, a bit odd, scenario with listbox and options:
|
@veselints I believe the |
@molily Apologies, I seemed to have missed your post. I believe your example is the same issue and the fix to exclude |
@straker but |
@veselints elements with |
@straker thank you for that clarification! In that case, the |
Validated with the latest axe-core develop branch code base,
passes the list rule, and
passes the definition-list rule. |
Hi @straker, noticed that the aria-required-children violation is still being triggered for the code snippet below, even after the fix was applied.
However, the rule will pass if the
|
@clamli While the issue is close, the fix hasn't been released. You can test this out by installing axe-core@next from NPM (or waiting until axe-core 4.8 is released, targeted next week). If I run your listbox code above I get it back as "incomplete" ("needs review" in the extension). That's because the listbox has no options. If you add an option it passes: <div role="listbox" aria-label="Hello">
<div>
<div aria-hidden="true"></div>
</div>
<div role="option" aria-selected="true">World</div>
</div> |
@WilcoFiers, thanks for answering, that makes sense! One more question, why does it pass if we change |
…description, and promote scrollable-region-focusable (#6849) This commit updates axe-core to its latest version, 4.7.2, from 4.6.3. It also bumps the accessibility-insights-report package version. As part of the axe-core update: * The `aria-roledescription` rule has been deprecated (dequelabs/axe-core#3649). * `scrollable-region-focusable` axe-core rule failures have been promoted from "needs review" to "serious" (manually removed from explicit "needs review" but included automatically by axe-core), see dequelabs/axe-core#3862 and dequelabs/axe-core#3939. * `falsePositiveRemoval` introduced in ed75fda has been removed as the corresponding dequelabs/axe-core#3850 has been resolved. Part of Feature 2086120 (internal access required to view).
Product
axe-core
Product Version
4.6.2
Latest Version
Issue Description
Expectation
The following pattern should not result in an
aria-required-children
failure:Actual
This results in a failure with the following
failureSummary
:How to Reproduce
Minimal repro (+ an example where the same case without
aria-hidden="true"
does not trigger the failure)Additional context
Per #3462, the "unknown" failure path introduced in
aria-required-children
in #3597 attempts to detect cases similar to this ACT rule's "failed example 3", where a child in the accessibility tree (emphasis mine) does not have a role that matches one of the requiredOwned roles for the parent.However, we think the logic introduced in #3597 to determine whether a child is "in the accessibility tree" for the purposes of this rule is a bit off - it does so by asking "does the child have any global ARIA attribute OR is it focusable". However,
aria-hidden
is a global ARIA attribute which currently triggers the first clause of this check, which is inconsistent with the rule. Per the glossary of the ACT rule in question, an element which is programmatically hidden should be treated as "not included in the accessibility tree" for the purposes of this check:Right now, even a non-focusable child whose only global ARIA attribute is
aria-hidden="true"
causes a failure, which I think is pretty firmly a false positive. The wording of the ACT rule as written suggests that a programmatically hidden child should not trigger a failure even if it is focusable - I think it would be reasonable to flag that as a best-practice level warning anyway, but I think the non-focusable case clearly shouldn't fail.The text was updated successfully, but these errors were encountered: