-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add command & commandfor attribute related mappings #2354
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for wai-aria 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.
feel free to reach out if you have questions / want to talk through what i was suggesting
Okay @scottaohara I've expanded it as you described, I think it makes a lot more sense. Now each state has its own table which prescibes how that state should map. I've included all currently specified states, toggle/show/hide popover, close, and show modal. |
345eeda
to
0b1053c
Compare
ok i think this can work. we still need attribute tables for command and command for. but as far as i'm concerned, those attribute tables could be simplified to just list the attribute, and point to the instances you made in the element section. e.g., like how the (mental note to reduce redundancy and unnecessary page link by squashing all "not mapped" or "see ..." rows into a single comment row for other attributes too...) |
<li>The element is a descendant of the `popover` it is associated with.</li> | ||
<!-- accessibility sibling will be defined in the ARIA specification --> | ||
</ul> | ||
<p class="note">A button that has a [=button/form owner=] without `type` in the "`button`" state cannot invoke a command.</p> |
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.
A plain old <button>
is not enough? IT has to have a type attribute?
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.
Discussing further in whatwg/html#9841 I think I misunderstood past decisions, but a form owner button with an implicit type should revert to button when it has the command
/commandfor
attributes so this is actually wrong, I'll fix.
@@ -1257,6 +1257,328 @@ <h4 id="el-button">`button`</h4> | |||
</tr> | |||
</tbody> | |||
</table> | |||
<h4 id="el-button-command-togglepopover">`button` <span class="el-context">(`command` attribute in the Toggle popover state)</span></h4> |
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.
Is there a difference in what we expose for toggle vs show? Can we the combine mapping entries for those into one?
<td><a class="core-mapping" href="#role-map-button">`button`</a> role.</td> | ||
</tr> | ||
<tr> | ||
<th> |
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.
No mappings for this one? What about the details relation?
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.
being a button that opens a modal dialog and where focus will automatically be put into the dialog once it's opened, there's no need for any additional mappings.
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 probably need to apply the patch and view the HTML to make sure this fact stands out enough.
This adds the mapping for
command
andcommandfor
attributes as per the Invokers Explainer.Additions:
Test, Documentation and Implementation tracking
Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.