Making WordPress.org


Ignore:
Timestamp:
04/20/2017 03:44:38 PM (8 years ago)
Author:
ocean90
Message:

Plugin Directory: Provide more context for "Read more" and "Show less" buttons to improve accessibility.

Props SergeyBiryukov, joedolson.
Fixes #2292.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php

    r5026 r5394  
    1616    class="plugin-<?php echo esc_attr( $section_slug ); ?> section <?php if ( $section_read_more ) { echo 'read-more'; } ?>"
    1717>
    18     <h2><?php echo $section['title']; ?></h2>
     18    <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo $section['title']; ?></h2>
    1919    <?php echo $section_content; ?>
    2020</div>
     
    2424    class="button-link section-toggle"
    2525    aria-controls="<?php echo esc_attr( $section_slug ); ?>"
     26    aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>"
    2627    aria-expanded="false"
    2728    data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>"
Note: See TracChangeset for help on using the changeset viewer.