mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Accessibility: Media: Add an aria-pressed
attribute to active button within a button group.
The `aria-pressed` attribute communicates semantically the "active" state of buttons that otherwise only look "active". Fixes #48355. Built from https://develop.svn.wordpress.org/trunk@46748 git-svn-id: http://core.svn.wordpress.org/trunk@46548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06ab7e3f6b
commit
c0950c1d50
@ -8758,8 +8758,12 @@ Settings = View.extend(/** @lends wp.media.view.Settings.prototype */{
|
||||
|
||||
// Handle button groups.
|
||||
} else if ( $setting.hasClass('button-group') ) {
|
||||
$buttons = $setting.find('button').removeClass('active');
|
||||
$buttons.filter( '[value="' + value + '"]' ).addClass('active');
|
||||
$buttons = $setting.find( 'button' )
|
||||
.removeClass( 'active' )
|
||||
.attr( 'aria-pressed', 'false' );
|
||||
$buttons.filter( '[value="' + value + '"]' )
|
||||
.addClass( 'active' )
|
||||
.attr( 'aria-pressed', 'true' );
|
||||
|
||||
// Handle text inputs and textareas.
|
||||
} else if ( $setting.is('input[type="text"], textarea') ) {
|
||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-alpha-46747';
|
||||
$wp_version = '5.4-alpha-46748';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user