Add command & commandfor attribute related mappings
This adds the mapping for command and commandfor attributes as per the Invokers Explainer.
Additions:
- 3.6.25 command (in the Toggle, Show, and Hide popover states)
- 3.6.26 command (in the Close and Show Modal states)
- 3.6.27 commandfor
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.
- [ ] "author MUST" tests:
- [ ] "user agent MUST" tests:
- [x] Browser implementations (link to issue or commit):
- WebKit: https://bugs.webkit.org/show_bug.cgi?id=269672
- Gecko:
- Blink: https://chromium-review.googlesource.com/c/chromium/src/+/5942728
- [x] Does this need AT implementations? Yes
- [ ] Related APG Issue/PR:
- [ ] MDN Issue/PR:
WebKit internal tests: https://searchfox.org/wubkat/source/LayoutTests/accessibility/mac/expanded-notification-commandfor-popover.html
Chrome internal tests: https://source.chromium.org/chromium/chromium/src/+/main:content/test/data/accessibility/html/commandfor-api-popover.html;l=1?q=commandfor.*api&sq= & https://source.chromium.org/chromium/chromium/src/+/main:content/test/data/accessibility/html/commandfor-api-dialog.html
Deploy Preview for wai-aria ready!
| Name | Link |
|---|---|
| Latest commit | 956a062df8b71e2fbff2d4e33273fb98a57193bd |
| Latest deploy log | https://app.netlify.com/sites/wai-aria/deploys/67ed49fd5315090008a88040 |
| Deploy Preview | https://deploy-preview-2354--wai-aria.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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.
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 type attribute for inputs is listed - but simpler... i could see that just removing all the individual mapping rows and in the comments, just link to the first of the button (command in the x state) tables you made.
(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...)
https://github.com/whatwg/html/pull/9841 is close to ready. Is this expected to be merged soon @scottaohara & @aleventhal? Ideally we can merge both around the same time.
@keithamus i have taken some of aaron's feedback and reconfigured this a bit.
The related states are now their own mapping tables popover (toggle,show,hide) and dialog (close, show-modal). These have been moved to the attribute section, rather than in the element section. This was more just a partial re-consolidation and moving around, where the only major change I made was removed the mappings for aria-expanded for the close command. Exposing that state should have been similar to a close button within a popover, where the expanded state isnt' necessary to communicate in that context.
i added the missing commandfor table - but it's largely there to indicate that it serves as a way to associate the button and the element it commands - but again the mappings under the command states are where any programmatic associations that need to be exposed to users are defined.
cc @aleventhal @jcsteh @cookiecrook / @rahimabdi for reviews for your platforms - but not much should be different here since these mappings were already similarly specified for popover/popovertarget.
I'm particularly curious if Webkit is looking to implement any of the aria-details relationships that chrome/firefox have implemented, and if anything more specific needs to be added to the ax row of the command=show,hide,toggle (or popovertarget for that matter)
@annevk pending reviews, i think @keithamus did a good job getting this setup, and i spent parts of today finishing it up. pinged reviewers in my previous comment.
If https://github.com/whatwg/html/pull/11045 is merged this PR will need updating to handle the request-close command alongside the close command.
(or a follow-up if this gets merged per the HTML spec being merged)
(non-authoritative non-a11y person) LGTM
As this has landed in the html spec, is shipped in chrome/edge and is being implemented by other browsers, i'm merging this PR.