-
Notifications
You must be signed in to change notification settings - Fork 780
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
aXe Coconut issue for rule: <li> elements must be contained in a <ul> or <ol> #1200
Comments
Have you tested this in AT to see how well it is supported? We need that data to make a decision on whether to support it in axe-core. |
Well, how would you determine how well it is supported? What would be the expected behavior for these particular semantics for what particular AT? What does "accessibility-supported" mean for Deque? To me, in this instance, it is a judgement call. Changing the role of the I guess the main thing is that the strength of aXe is that it doesn't result in as many false positives (or negatives--can never remember which is which), so it is strange that it would be this opinionated here. JAWS 18
NVDA 2018.2.1
VoiceOver/Safari on macOS High Sierra
VoiceOver/Safari on iOS 12.0.1
Talkback/Firefox on Android 8 (Samsung Galaxy S8)
|
And this is what I was using to test: <h2>List with No Links</h2>
<button>focus target</button>
<p>some more text</p>
<ul aria-label="unordered list with no links">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
<h2>Group with No Links</h2>
<button>focus target</button>
<p>some more text</p>
<ul role="group" aria-label="group override with no links">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
<h2>List with Links</h2>
<button>focus target</button>
<p>some more text</p>
<ul aria-label="unordered list with links">
<li><a href="a.html">item 1</a></li>
<li><a href="b.html">item 2</a></li>
<li><a href="c.html">item 3</a></li>
</ul>
<h2>Group with Links</h2>
<button>focus target</button>
<p>some more text</p>
<ul role="group" aria-label="group override with no links">
<li><a href="a.html">item 1</a></li>
<li><a href="b.html">item 2</a></li>
<li><a href="c.html">item 3</a></li>
</ul>
<p>some text</p>
<button>focus target</button> |
Thanks so much for the thorough results! It does sound pretty nuanced; I'll wait until @WilcoFiers and @dylanb get a chance to chime in, as we always discuss these things to come to a consensus before making changes in axe-core. That said, you can read a blog post I wrote recently about Accessibility Support in axe: https://www.deque.com/blog/weve-got-your-back-with-accessibility-supported-in-axe/ |
Hey Rob. Thank you for reporting this issue. I struggle with this case. There certainly seems to be an accessibility issue there, when you can't use list shortcut keys, and item count doesn't seem to work. It almost seems to me like you're trying to have the list both function as a list and a landmark. Have you considered using a separate element to give the region a name, something like: <nav aria-label="actions"><ul>
<li><a href="">...</a></li>
</ul></nav> |
Actually, in this instance, it already is in a labelled |
Here is the full quote from the spec
|
I find that quote subtle and confusing. Semantically, at least, it still seems valid to use the <!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body>
<ul role="group" aria-label="group overriding unordered list">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</body>
</html> Also, if you, instead, wrap the list items in a <ul>
<div role="group" aria-label="group inside unordered list">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</div>
</ul> |
And the second code snippet I provided does fail the Nu HTML Checker (though I think wrongly, based on the spec), so take that for what it's worth. Maybe it would be helpful if there was an example of where
|
I believe the ARIA spec is not precise enough in the definition of listitem. It should really state:
|
@schne324 would it be possible for you to clarify this with the other members of the ARIA WG? |
@dylanb I can do that. I'll post any feedback here |
Relevant pull request: w3c/aria#869 |
Great. Thanks for getting clarity on this. |
I believe this rule is incorrect. As an example, see this semantically proper markup, which it catches as a violation:
The Aria 1.1 definition for the listitem role states:
Now, I'm not sure that changing the
ul
to agroup
is a great idea, but it doesn't seem strictly improper. I'm guessing it probably was done this way to get certain screen readers to more reliably voice the label provided for it.The text was updated successfully, but these errors were encountered: