Make WordPress Core

Changeset 60884


Ignore:
Timestamp:
09/30/2025 11:06:01 PM (11 months ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/kses.php

    r60671 r60884  
    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(
     
    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(),
     
    363372                'u'          => array(),
    364373                'ul'         => array(
    365                         'type' => true,
     374                        'type'    => true,
     375                        'popover' => true,
     376                        'role'    => true,
    366377                ),
    367378                'ol'         => array(
Note: See TracChangeset for help on using the changeset viewer.