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

Clarify aria-required-parent/child message for presentation conflict #4362

Open
WilcoFiers opened this issue Mar 7, 2024 · 1 comment
Open
Labels
fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules)

Comments

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Mar 7, 2024

the following code creates a somewhat confusing remediation message:

<ul role="tablist">
  <li role="presentation" aria-hidden="false">
    <div role="tab" tabindex="0" aria-selected="true">Tab 1</div>
  </li>
</ul>
## aria-required-children:
Fix any of the following:
- Element has children which are not allowed: [role=presentation]
- Element uses aria-busy="true" while showing a loader

## aria-required-parent:
Fix any of the following:
- Required ARIA parent role not present: tablist

Using [role=presentation] is just fine here, the issue is with the global attribute. The issue is that the presentation role is ignored because of aria-hidden. We should have an explicit message explaining this in both rules.

@WilcoFiers WilcoFiers added fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules) labels Mar 7, 2024
@straker
Copy link
Contributor

straker commented Mar 7, 2024

It also should give an presentation-role-conflict violation which tells you about the conflict, though the message is a bit confusing as well ("does not have global ARIA attribute"?)

"Fix all of the following:
  Element does not have global ARIA attribute"

Do we need to tell the user 3 times that the role is ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

No branches or pull requests

2 participants