Make WordPress Core


Ignore:
Timestamp:
02/14/2025 08:32:48 PM (11 months ago)
Author:
joedolson
Message:

Customize: Accessibility: Restore heading semantics in sections.

Remove role="presentation" from headings in the customizer. These were needed to avoid confusing semantics when the headings also acted as buttons to control accordions, changed in [59924].

Change responsive CSS to use screen-reader-text styling rather than display: none so that mobile retains the headings hierarchy.

Props joedolson, hbhalodia, mikinc860, guillaumeturpin, rcreators, tirth03, dhrumilk .
Fixes #62215.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r59224 r59825  
    12231223        ?>
    12241224        <div id="<?php echo esc_attr( $id ); ?>" class="accordion-section">
    1225             <h4 class="accordion-section-title" role="presentation">
     1225            <h4 class="accordion-section-title">
    12261226                <button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="<?php echo esc_attr( $id ); ?>-content">
    12271227                    <?php echo esc_html( $available_item_type['title'] ); ?>
     
    12581258        ?>
    12591259        <div id="new-custom-menu-item" class="accordion-section">
    1260             <h4 class="accordion-section-title" role="presentation">
     1260            <h4 class="accordion-section-title">
    12611261                <button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="new-custom-menu-item-content">
    12621262                    <?php _e( 'Custom Links' ); ?>
Note: See TracChangeset for help on using the changeset viewer.