Make WordPress Core


Ignore:
Timestamp:
02/14/2025 08:32:48 PM (13 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-admin/customize.php

    r59789 r59825  
    234234                <div id="customize-info" class="accordion-section customize-info" data-block-theme="<?php echo (int) wp_is_block_theme(); ?>">
    235235                    <div class="accordion-section-title">
    236                         <span class="preview-notice">
     236                        <h2 class="preview-notice">
    237237                        <?php
    238238                            /* translators: %s: The site/panel title in the Customizer. */
    239239                            printf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' );
    240240                        ?>
    241                         </span>
     241                        </h2>
    242242                        <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
    243243                            <?php
Note: See TracChangeset for help on using the changeset viewer.