Make WordPress Core


Ignore:
Timestamp:
01/27/2021 09:31:42 PM (3 years ago)
Author:
joedolson
Message:

Twenty Twenty: Remove aria-expanded on search modal close button.

The Twenty Twenty search modal uses aria-expanded correctly on the Search button, but toggles the aria-expanded value on the 'close' button. The close button is a different control, however, so the attribute value toggling is uneven. The close button does not toggle any behavior; it only closes a control that has already been opened.

Props alexstine, audrasjb
Fixes #52355

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/template-parts/modal-search.php

    r46827 r50033  
    2323            ?>
    2424
    25             <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field" aria-expanded="false">
     25            <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field">
    2626                <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span>
    2727                <?php twentytwenty_the_theme_svg( 'cross' ); ?>
Note: See TracChangeset for help on using the changeset viewer.