mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Customizer: Add an aria-expanded
attribute to the Add Menu button to improve accessibility.
props afercia. fixes #32791. Built from https://develop.svn.wordpress.org/trunk@32971 git-svn-id: http://core.svn.wordpress.org/trunk@32942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d9a46b973
commit
2ecb586214
@ -855,11 +855,13 @@
|
||||
customizer = section.container.closest( '.wp-full-overlay-sidebar-content' );
|
||||
if ( expanded ) {
|
||||
button.addClass( 'open' );
|
||||
button.attr( 'aria-expanded', 'true' );
|
||||
content.slideDown( 'fast', function() {
|
||||
customizer.scrollTop( customizer.height() );
|
||||
});
|
||||
} else {
|
||||
button.removeClass( 'open' );
|
||||
button.attr( 'aria-expanded', 'false' );
|
||||
content.slideUp( 'fast' );
|
||||
}
|
||||
}
|
||||
|
4
wp-admin/js/customize-nav-menus.min.js
vendored
4
wp-admin/js/customize-nav-menus.min.js
vendored
File diff suppressed because one or more lines are too long
@ -562,9 +562,8 @@ class WP_Customize_New_Menu_Section extends WP_Customize_Section {
|
||||
protected function render() {
|
||||
?>
|
||||
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
|
||||
<button type="button" class="button-secondary add-new-menu-item add-menu-toggle">
|
||||
<button type="button" class="button-secondary add-new-menu-item add-menu-toggle" aria-expanded="false">
|
||||
<?php echo esc_html( $this->title ); ?>
|
||||
<span class="screen-reader-text"><?php _e( 'Press return or enter to open' ); ?></span>
|
||||
</button>
|
||||
<ul class="new-menu-section-content"></ul>
|
||||
</li>
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32970';
|
||||
$wp_version = '4.3-alpha-32971';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user