KSES: Add selected ARIA attributes support.

Allow low-privileged users to use the ARIA attributes `aria-describedby`, `aria-details`, `aria-label`, `aria-labelledby` and `aria-hidden`.

Merges [43731] to trunk.

Props mattheu, swissspidy, rianrietveld, afercia, GaryJ.
See #30421.


git-svn-id: https://develop.svn.wordpress.org/trunk@43984 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2018-12-12 03:14:47 +00:00
parent 805326cbd4
commit a73e82011f
1 changed files with 11 additions and 6 deletions

View File

@ -2119,12 +2119,17 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
*/
function _wp_add_global_attributes( $value ) {
$global_attributes = array(
'class' => true,
'id' => true,
'style' => true,
'title' => true,
'role' => true,
'data-*' => true,
'aria-describedby' => true,
'aria-details' => true,
'aria-label' => true,
'aria-labelledby' => true,
'aria-hidden' => true,
'class' => true,
'id' => true,
'style' => true,
'title' => true,
'role' => true,
'data-*' => true,
);
if ( true === $value ) {