Skip to content

Commit

Permalink
Remove not needed aria-hidden attribute in navigation block experiment (
Browse files Browse the repository at this point in the history
WordPress#51044)

* Add aria-hidden selector

* Use `offsetParent` to check if the menu is visible

* Remove `aria-hidden` attribute
  • Loading branch information
SantosGuillamot authored and sethrubenstein committed Jul 13, 2023
1 parent 00524f0 commit e914cdf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/experimental/interactivity-api/blocks.php
Expand Up @@ -112,7 +112,6 @@ function gutenberg_block_core_navigation_add_directives_to_markup( $block_conten
) ) {
$w->set_attribute( 'data-wp-class.has-modal-open', 'selectors.core.navigation.isMenuOpen' );
$w->set_attribute( 'data-wp-class.is-menu-open', 'selectors.core.navigation.isMenuOpen' );
$w->set_attribute( 'data-wp-bind.aria-hidden', '!selectors.core.navigation.isMenuOpen' );
$w->set_attribute( 'data-wp-effect', 'effects.core.navigation.initMenu' );
$w->set_attribute( 'data-wp-on.keydown', 'actions.core.navigation.handleMenuKeydown' );
$w->set_attribute( 'data-wp-on.focusout', 'actions.core.navigation.handleMenuFocusout' );
Expand Down

0 comments on commit e914cdf

Please sign in to comment.