Make WordPress Core


Ignore:
Timestamp:
10/07/2015 01:27:01 AM (9 years ago)
Author:
wonderboymusic
Message:

List Tables/WP_Screen: in WP_Screen, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.

These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r34728 r34891  
    382382        if ( empty( $views ) )
    383383            return;
     384
     385        $this->screen->render_screen_reader_content( 'heading_views' );
    384386
    385387        echo "<ul class='subsubsub'>\n";
     
    735737        }
    736738
     739        if ( 'top' === $which && $total_pages > 1 ) {
     740            $this->screen->render_screen_reader_content( 'heading_pagination' );
     741        }
     742
    737743        $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
    738744
     
    11181124
    11191125        $this->display_tablenav( 'top' );
     1126
     1127        $this->screen->render_screen_reader_content( 'heading_list' );
    11201128?>
    11211129<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
Note: See TracChangeset for help on using the changeset viewer.