Skip to content

Commit 1e09029

Browse files
committed
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
1 parent c916ebd commit 1e09029

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/wp-includes/kses.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
26082608
* @since 3.5.0
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
26132614
* @ignore
@@ -2617,8 +2618,11 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
26172618
*/
26182619
function _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,
26242628
'aria-hidden' => true,

0 commit comments

Comments
 (0)