Opened 9 months ago
Closed 4 months ago
#64576 closed enhancement (fixed)
Add support for invoker command attributes
| Reported by: | joedolson | Owned by: | joedolson |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Formatting | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: | ui, accessibility, javascript, css |
Description
Similar to the support added to popovers, invoker commands are now baseline, and should be allowed in post content.
See #61959.
Change History (11)
#2
@
9 months ago
Related:
- gutenberg#69363: Make the navigation block content available when JavaScript is disabled
- gutenberg#69720: Navigation block: use
<dialog>
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
7 months ago
This ticket was mentioned in PR #11483 on WordPress/wordpress-develop by @pratiknawkar94.
6 months ago
#5
- Keywords has-patch has-unit-tests added; needs-patch removed
Allow the Invoker Commands API attributes command and commandfor on <button> in $allowedposttags so post content sanitization (wp_kses_post()) no longer strips them. This matches existing support for popovertarget / popovertargetaction from the Popover API work (#61959).
Adds a PHPUnit test that verifies a button with command / commandfor and a popover target survives wp_kses_post().
#6
follow-up:
↓ 7
@
4 months ago
https://github.com/WordPress/wordpress-develop/pull/11483 looks good to me.
Question: should we allow the autofocus global attribute?
It's pretty important to handle focus within a <dialog> element.
#7
in reply to: ↑ 6
;
follow-up:
↓ 8
@
4 months ago
Replying to afercia:
Question: should we allow the
autofocusglobal attribute?
It's pretty important to handle focus within a<dialog>element.
My only concern is abuse, where someone could write a post and add autofocus to it as a way to get more eyes on it. So maybe we should open a separate ticket for that, and maybe strip it out automatically if it isn't inside a DIALOG.
#8
in reply to: ↑ 7
@
4 months ago
- Keywords commit added
Replying to westonruter:
My only concern is abuse, where someone could write a post and add
autofocusto it as a way to get more eyes on it. So maybe we should open a separate ticket for that, and maybe strip it out automatically if it isn't inside aDIALOG.
Good point. Agree on creating a new ticket for the autofocus attribute.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
E.g., see documentation in https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API, article at https://schalkneethling.com/posts/opening-and-closing-dialogs-without-javascript-using-html-invoker-commands/