-
Notifications
You must be signed in to change notification settings - Fork 83
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
Clarifications to allowed roles on li element #824
Comments
need more investigation from triage. Is this already done in the current parent-child check? |
This is about
A lot of the other scenarios are picked up by other rules. |
@scottaohara is this change still pending? I don't see the change in ARIA in HTML recommendation or draft. thanks for the clarification. |
@shunguoy yes. The hold up for any PR is because the ARIA in HTML spec is following the W3C's living standard model, where we try not to merge changes into the spec until we get at least 2 implementations / commitments for implementation. The intent here is to try to help conformance checkers not have gaps in their support - e.g., if we merged this without your implmentation, then this checker would have a gap. But, if we wait for implementations, then the rules better reflect the checkers. If, however, this is not working for you and your team needs this merged into the spec before you will work on it, then we will forgo this method and instead just merge changes into the spec. Though that will mean your team will be more likely to have gaps in what the spec says vs what your tool reports. |
@scottaohara thanks |
@scottaohara If the container (ul, ol, etc) has an explicit role like |
@tombrunet that's a bit of a browser heuristic right now. It wouldn't be defined in ARIA in HTML, but rather HTML AAM. I have been working on something to address this 'undocumented' behavior in that spec. But I can call this out more overtly in the current PR as well, if this is something you'd need mentioned before work can be done. Edit: this PR should make it more clear in the AAM spec, in lieu of the larger update i referenced, and once this is merged then I can revise the current ARIA in HTML pr which would mirror the normative AAM text |
Pushed |
ARIA in HTML is clarifying the allowed roles on
li
elements.This update disallows any role on an
li
element so long as it is a child of aul
,ol
ormenu
element is exposed as an implicit or explicit role=list. A role oflistitem
could produce a warning for unnecessary use of a redundant role.However, if the parent
ul
,ol
ormenu
has its implicit list role overwritten, then theli
may have Any role so long as that role is an allowed role of its ancestor elements.For example, the following
li
may have arole=button
specified as the parent list element as arole=none
However, as the following
ul
has arole=menu
specified, therole=button
is not allowed. The only allowed roles for theli
would bemenuitem
,menuitemcheckbox
ormenuitemradio
(ornone
/presentation
so long as within theli
there is one of the menteionedmenuitem*
roles).similar to the following, as while the
ul
has arole=none
, it is a child of arole=tablist
, so therefor theli
may only have a role that is an expected descendant of atablist
.Finally, even though the following would be flagged for invalid HTML, the
li
is again allowed any role as it is exposed as ageneric
role when not correctly nested within a list element:Additional test cases provided here.
The text was updated successfully, but these errors were encountered: