From 6bd164afa314fe11d88c6bf643cfb90a0ebecff3 Mon Sep 17 00:00:00 2001 From: joedolson Date: Tue, 30 Sep 2025 23:08:31 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@60884 git-svn-id: http://core.svn.wordpress.org/trunk@60220 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/kses.php | 23 +++++++++++++++++------ wp-includes/version.php | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 18f183cf3d..dfb1f415d7 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -109,10 +109,13 @@ if ( ! CUSTOM_TAGS ) { ), 'br' => array(), 'button' => array( - 'disabled' => true, - 'name' => true, - 'type' => true, - 'value' => true, + 'disabled' => true, + 'name' => true, + 'type' => true, + 'value' => true, + 'popovertarget' => true, + 'popovertargetaction' => true, + 'aria-haspopup' => true, ), 'caption' => array( 'align' => true, @@ -145,7 +148,13 @@ if ( ! CUSTOM_TAGS ) { 'open' => true, ), 'div' => array( - 'align' => true, + 'align' => true, + 'popover' => true, + ), + 'dialog' => array( + 'closedby' => true, + 'open' => true, + 'popover' => true, ), 'dl' => array(), 'dt' => array(), @@ -362,7 +371,9 @@ if ( ! CUSTOM_TAGS ) { 'tt' => array(), 'u' => array(), 'ul' => array( - 'type' => true, + 'type' => true, + 'popover' => true, + 'role' => true, ), 'ol' => array( 'start' => true, diff --git a/wp-includes/version.php b/wp-includes/version.php index 8492f8a911..ee9b521e36 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60816'; +$wp_version = '6.9-alpha-60884'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.