-
Notifications
You must be signed in to change notification settings - Fork 75
Update the aria-required-owned rule [bc4a75] to include the elements with implicit roles #2318
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for act-rules ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @shunguoy
Approving. Except that I think this does require a regular 2-week Call for review period.
<li role="none"></li> | ||
<li role="menuitem">Item 1</li> | ||
<div role="none"></div> | ||
<div role="menuitem">Item 1</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no reason to change this. This is an important example to demonstrate explicit roles override implicit ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was in the original suggestion, I didn't hear objection during the discussion (I could be wrong). Per HTML 5, the li can only be used as a child of ul, ol, or menu. Otherwise, no list relationship is defined:
The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element.
This change is to make sure no confusion on the relationship, and maintain the purpose of the example at the same time.
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
@WilcoFiers added more Pass/Fail test cases for native elements. Please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The applicability now includes implicit roles, but we currently lack any failing examples of them. IMO, if we intend this new applicability to focus on "semantic roles" rather than "explicit roles" only, we should include additional examples that illustrate implicit roles.
@giacomo-petri if you review the changes for the rule, I added a few examples with implicit roles: Passed Examples 7 - 9, Failed Examples 8 & 9, some with mixed explicit and implicit roles. |
@shunguoy, yes, I've noticed the improvements. I was specifically talking and curious if we could have something similar to the Passed Example 9:
but for failing examples. For instance, this scenario is now matching the applicability (and previously it wasn't):
however, we don’t have any examples with this kind of issue. |
@giacomo-petri added this as Failed Example 10. Also added a note |
The original description limits the rule to the elements with explicit semantic roles only. The rule should apply to elements with either explicit or implicit roles.
The changes include the following updates: (1) the description of implicit roles; (2) test cases accordingly; and (3) other minor code cleanups.
Need for Call for Review:
This can be merged with 1 approval
How to Review And Approve