Skip to content

Commit 5810c47

Browse files
committed
Editor: Allow popover attributes in editor content.
Add attributes to KSES so that it's possible to create popover interactions natively in the editor. Adds `popovertarget`, `popovertargetaction` and `aria-haspopup` to `button`; `popover` to `div`, `ul`, and adds `dialog` with the attributes `open`, `closedby`, and `popover`. Props harshdeepgill, jonsurrell, joedolson, sukhendu2002, flixos90, joedolson. Fixes #61959. git-svn-id: https://develop.svn.wordpress.org/trunk@60884 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 08b2f9c commit 5810c47

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/wp-includes/kses.php

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@
109109
),
110110
'br' => array(),
111111
'button' => array(
112-
'disabled' => true,
113-
'name' => true,
114-
'type' => true,
115-
'value' => true,
112+
'disabled' => true,
113+
'name' => true,
114+
'type' => true,
115+
'value' => true,
116+
'popovertarget' => true,
117+
'popovertargetaction' => true,
118+
'aria-haspopup' => true,
116119
),
117120
'caption' => array(
118121
'align' => true,
@@ -145,7 +148,13 @@
145148
'open' => true,
146149
),
147150
'div' => array(
148-
'align' => true,
151+
'align' => true,
152+
'popover' => true,
153+
),
154+
'dialog' => array(
155+
'closedby' => true,
156+
'open' => true,
157+
'popover' => true,
149158
),
150159
'dl' => array(),
151160
'dt' => array(),
@@ -362,7 +371,9 @@
362371
'tt' => array(),
363372
'u' => array(),
364373
'ul' => array(
365-
'type' => true,
374+
'type' => true,
375+
'popover' => true,
376+
'role' => true,
366377
),
367378
'ol' => array(
368379
'start' => true,

0 commit comments

Comments
 (0)