Skip to content
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

aria-valid-attr-value possible false positive with aria-controls #1463

Closed
bebebebebe opened this issue Mar 29, 2019 · 6 comments · Fixed by #1515
Closed

aria-valid-attr-value possible false positive with aria-controls #1463

bebebebebe opened this issue Mar 29, 2019 · 6 comments · Fixed by #1515
Assignees
Labels
fix Bug fixes rules Issue or false result from an axe-core rule support

Comments

@bebebebebe
Copy link

Assumption: aria-controls can be used for a collapsible element. While the element is in collapsed state, it could be the collapsed content is not in the DOM. In this case, we can have aria-controls="someId", but no element present with id "someId."
https://www.w3.org/WAI/GL/wiki/Using_the_WAI-ARIA_aria-expanded_state_to_mark_expandable_and_collapsible_regions

Expected: The case described above will not lead to an aria-valid-attr-value error.

Actual: The case described above leads to an aria-valid-attr-value error.

Motivation: I'm concerned that the above is a false positive. Alternatively, if my assumption above is incorrect, it would be helpful to know so I can avoid actual errors!

axe-core version: 3.2

@WilcoFiers
Copy link
Contributor

Totally agreed, when on a thing with aria-expanded="false" I would think that should be allowed. Thank you for reporting!

@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule labels Mar 31, 2019
@iamrafan
Copy link
Contributor

iamrafan commented Apr 4, 2019

@WilcoFiers We think, it should also be allowed on elements with aria-selected="false". Here is an example pointed out by one of our users: https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html

The inactive tabs should not fail this rule when the elements referenced to aria-controls(hidden elements in this example) are removed from the DOM.
image

@iamrafan
Copy link
Contributor

@straker @WilcoFiers: aria-owns also should be passed when aria-expanded="false". For example, comboboxes are required to have popups only when expanded.

@straker
Copy link
Contributor

straker commented Apr 25, 2019

@iamrafan could you open a separate issue for that one? I'll take a look at it as well

@iamrafan
Copy link
Contributor

@straker Sure, I filed #1524

@WilcoFiers WilcoFiers modified the milestones: HTMLTools Sprint 2, Axe-core 3.3 May 1, 2019
@jeankaplansky
Copy link
Contributor

@straker : what, if any documentation is required to complete this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rules Issue or false result from an axe-core rule support
Projects
None yet
6 participants