Make WordPress Core

Opened 4 weeks ago

Last modified 2 weeks ago

#53951 new defect (bug)

Twenty Twenty Search modal aria-expanded

Reported by: utz119 Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch needs-testing has-testing-instructions
Focuses: accessibility Cc:


Theme: Twenty Twenty

When opening the search modal using the Tab key, then closing it using the Esc key causes aria-expanded to remain “true” even after the modal is closed.

To reproduce the issue:

  1. Navigate to the search button using the Tab key
  2. Use the Enter key to open the search form
  3. Use the Esc key to close

Attachments (2)

TwentyTwenty-Search-ARIA-Expanded.gif (3.1 MB) - added by utz119 4 weeks ago.
53951.diff (1.4 KB) - added by utz119 2 weeks ago.

Change History (6)

#1 @mukesh27
4 weeks ago

  • Component changed from General to Bundled Theme
  • Version 5.8 deleted

Hi and welcome to WordPress Trac! Thanks for the ticket.

I reproduce the issue.

Additionally, if we click outside or the form it show same aria-expanded.

2 weeks ago

#2 @utz119
2 weeks ago

  • Keywords has-patch added

#3 @utz119
2 weeks ago

  • Keywords needs-testing added

#4 @Hareesh Pillai
2 weeks ago

  • Keywords has-testing-instructions added
  • Milestone changed from Awaiting Review to 5.9

Thanks for the ticket and patch @utz119.

It is noteworthy that the aria-expanded attribute is set correctly when the search modal is clicked in the responsive screen sizes. It is handled through the twentytwentyToggleAttribute() function. We should perhaps refresh the patch to make use of the currently written code.

Note: See TracTickets for help on using tickets.