mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
Customizer: Add an aria-expanded
attribute to the Add Menu button to improve accessibility.
props afercia. fixes #32791. git-svn-id: https://develop.svn.wordpress.org/trunk@32971 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3dd7ca4ed6
commit
37837c88f1
@ -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' );
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user