From 1e090291f0d9c4b80730cc4b05c2f84c33ac6835 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sun, 18 Jun 2023 16:39:05 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@55937 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 0ab8c3350d..c889299436 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -2608,6 +2608,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) { * @since 3.5.0 * @since 5.0.0 Added support for `data-*` wildcard attributes. * @since 6.0.0 Added `dir`, `lang`, and `xml:lang` to global attributes. + * @since 6.3.0 Added `aria-controls`, `aria-current`, and `aria-expanded` attributes. * * @access private * @ignore @@ -2617,8 +2618,11 @@ function safecss_filter_attr( $css, $deprecated = '' ) { */ function _wp_add_global_attributes( $value ) { $global_attributes = array( + 'aria-controls' => true, + 'aria-current' => true, 'aria-describedby' => true, 'aria-details' => true, + 'aria-expanded' => true, 'aria-label' => true, 'aria-labelledby' => true, 'aria-hidden' => true,