Make WordPress Core

Changeset 29240


Ignore:
Timestamp:
07/19/2014 02:36:07 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Customizer: Add screen reader text to announce that panels and sections are expandable.

props joedolson, ocean90.
fixes #27591.

File:
1 edited

Legend:

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

    r29158 r29240  
    178178        ?>
    179179        <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
    180             <h3 class="accordion-section-title" tabindex="0"><?php echo esc_html( $this->title ); ?></h3>
     180            <h3 class="accordion-section-title" tabindex="0">
     181                <?php echo esc_html( $this->title ); ?>
     182                <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>
     183            </h3>
    181184            <ul class="accordion-section-content">
    182185                <?php if ( ! empty( $this->description ) ) : ?>
     
    242245        ?>
    243246        <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section">
    244             <h3 class="accordion-section-title" tabindex="0"><?php echo esc_html( $this->title ); ?></h3>
     247            <h3 class="accordion-section-title" tabindex="0">
     248                <?php echo esc_html( $this->title ); ?>
     249                <span class="screen-reader-text"><?php _e( 'Press return or enter to open panel' ); ?></span>
     250            </h3>
    245251            <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>
    246252            <ul class="accordion-sub-container control-panel-content">
Note: See TracChangeset for help on using the changeset viewer.