[wp-trac] [WordPress Trac] #62215: Remove `role="presentation" from h4 section headings in customizer nav menus

WordPress Trac noreply at wordpress.org
Fri Jan 17 23:12:09 UTC 2025


#62215: Remove `role="presentation" from h4 section headings in customizer nav
menus
-------------------------------------------------+-------------------------
 Reporter:  joedolson                            |       Owner:  joedolson
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.8
Component:  Customize                            |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-         |     Focuses:
  testing-info                                   |  accessibility
-------------------------------------------------+-------------------------
Changes (by joedolson):

 * keywords:  has-patch => has-patch needs-testing has-testing-info


Comment:

 The updated patch adds styling so that

 1) The visible heading doesn't inherit the heading's font weight and
 margins and
 2) To put the hidden headings (used in mobile views) back into the DOM so
 that the menu and widget selectors have an appropriate heading ancestor.

 Because the panels are inserted after the previewer, this still doesn't
 result in a perfect headings hierarchy, but I think that it is going to
 significantly improve findability to have *some* headings for these
 elements over having none. The customizer headings are internally
 consistent.

 It might be nice to also update the customizer so that the panel
 insertions happen after the customizer controls, rather than after the
 preview, but I'm not sure that needs to be resolved as part of this
 ticket.

 To test:

 1) Open the customizer. Verify there is no visual difference, but that the
 top level heading (You are customizing / Theme Name) is an `h2` heading.
 2) Expand the Menus editor to reach the 'Add Items' panel.
 3) Inspect headings to verify that there is an H3 (not visible in desktop)
 that gives Add Menu Items context & the section headings for menu items
 are H4.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62215#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list