You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change is to clarify that if an li is a child of a ul, ol, or menu element, and those elements are exposed as a list, then no other role can be specified on the li.
However, if the parent of the li is no longer exposed as a list, or if someone were to write invalid markup and use an li outside of the expected list > listitem markup pattern, then any role should be allowed on the li (so long as the role is a role allowed by the li's parent element)
For instance,
<ul role=table>
<li role=button>...</li>
</ul>
is not be allowed as a button cannot be a direct child of a table. However, but a role=row on the li would be allowed in this example.
and
<div>
<li role=paragraph>...</li>
</div>
is invalid HTML, but as the li is not a child of a list element, it should be allowed to have any role.
that seems reasonable on its surface, but would make the implementation of the rule more complicated. practically one could do aria-hidden=true on the li to achieve the same effect, and not have to have additional checks to the rule to determine not only if it was empty, but if it did have children that they only equated to white space, or themselves had alt="", or aria-hidden=true or role=none/presentation, as applicable to the element and its children, if any.
re:
I lean against allowing role="separator" on <li>.
if that were actually allowed by ARIA/HTML, then it would be a reasonable allowance. Separately I have tested the current reality of how that works with AT, and while it causes some minor breakages depending on the browser/at combo, I have requested that become an allowance in HTML, which would then make it allowed in ARIA, and subsequently this spec. Until then though, there will be no change here on that matter.
that seems reasonable on its surface, but would make the implementation of the rule more complicated. practically one could do aria-hidden=true on the li to achieve the same effect
Meets 2 implementations reqIndicates that a spec change has met the necessary 2 implementations needed to merge.
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #351
This change is to clarify that if an
li
is a child of aul
,ol
, ormenu
element, and those elements are exposed as alist
, then no other role can be specified on theli
.However, if the parent of the
li
is no longer exposed as alist
, or if someone were to write invalid markup and use anli
outside of the expected list > listitem markup pattern, then any role should be allowed on theli
(so long as the role is a role allowed by theli
's parent element)For instance,
is not be allowed as a
button
cannot be a direct child of atable
. However, but arole=row
on theli
would be allowed in this example.and
is invalid HTML, but as the
li
is not a child of a list element, it should be allowed to have any role.test cases
Preview | Diff