Make WordPress Core

Changeset 55937


Ignore:
Timestamp:
06/18/2023 04:39:05 PM (11 months ago)
Author:
joedolson
Message:

Formatting: Support aria content attributes.

Add aria-controls, aria-expanded, and aria-current to allowed attributes in KSES.

Props crs1138, rsiddharth, mukesh27, SergeyBiryukov, joedolson, ryokuhi, peterwilsoncc, audrasjb, nataliat2004.
Fixes #55370.

File:
1 edited

Legend:

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

    r55822 r55937  
    26092609 * @since 5.0.0 Added support for `data-*` wildcard attributes.
    26102610 * @since 6.0.0 Added `dir`, `lang`, and `xml:lang` to global attributes.
     2611 * @since 6.3.0 Added `aria-controls`, `aria-current`, and `aria-expanded` attributes.
    26112612 *
    26122613 * @access private
     
    26182619function _wp_add_global_attributes( $value ) {
    26192620    $global_attributes = array(
     2621        'aria-controls'    => true,
     2622        'aria-current'     => true,
    26202623        'aria-describedby' => true,
    26212624        'aria-details'     => true,
     2625        'aria-expanded'    => true,
    26222626        'aria-label'       => true,
    26232627        'aria-labelledby'  => true,
Note: See TracChangeset for help on using the changeset viewer.