Make WordPress Core

Opened 5 weeks ago

Closed 6 days ago

#62896 closed defect (bug) (fixed)

Twenty Nineteen: Limit scope of aria-haspopup and aria-expanded to the primary menu

Reported by: bschneidewind's profile bschneidewind Owned by: joedolson's profile joedolson
Milestone: 6.8 Priority: normal
Severity: minor Version: 5.0
Component: Bundled Theme Keywords: has-patch has-testing-info commit
Focuses: accessibility Cc:

Description

The aria-haspopup and aria-expanded attributes are currently applied to the footer and social menus in the TwentyNineteen theme when children items are present in the menu.

The depth is set to 1 and the child items aren't actually there on the front end, but the attributes still end up displaying.

Attachments (2)

Screenshot 2025-02-06 181927.png (103.9 KB) - added by mikinc860 4 weeks ago.
Screenshot 2025-02-06 182123.png (90.5 KB) - added by mikinc860 4 weeks ago.

Download all attachments as: .zip

Change History (9)

This ticket was mentioned in PR #8239 on WordPress/wordpress-develop by @bschneidewind.


5 weeks ago
#1

  • Keywords has-patch added

The aria-haspopup and aria-expanded attributes are currently applied to the footer and social menus in the TwentyNineteen theme when children items are present in the menu.

The depth is set to 1 and the child items aren't actually there on the front end, but the attributes still end up displaying.

Trac ticket: https://core.trac.wordpress.org/ticket/62896

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


5 weeks ago

#4 @joedolson
5 weeks ago

  • Milestone changed from Awaiting Review to 6.8
  • Owner set to joedolson
  • Status changed from new to accepted
  • Version set to 5.0

#5 @mikinc860
4 weeks ago

  • Keywords has-testing-info added

Test Report

This report confirms the functionality of the patch provided.
Tested Patch: https://github.com/WordPress/wordpress-develop/pull/8239

Environment

OS: Windows 11
Web Server: WordPress Playground
PHP: Playground Default
WordPress Version: 6.8-alpha-20250203.050418
Browser: Chrome
Theme: Twenty Nineteen v3.0
Active Plugins: None

Actual Results

Front-end behavior: The patch resolved the issue successfully.

#6 @joedolson
6 days ago

  • Keywords commit added

Reviewed; marking for commit.

#7 @joedolson
6 days ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 59921:

Bundled Themes: Twenty Nineteen: Omit irrelevant ARIA in menus.

Don't set aria-expanded and aria-haspopup attributes outside of the primary menu. Secondary menus (social and footer) are set to a depth of 1, and have nothing to expand or popup.

Props bschneidewind, joedolson, mikinc860.
Fixes #62896.

Note: See TracTickets for help on using tickets.