Make WordPress Core

Changeset 34891

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.

Location:
trunk/src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-comments.php

    r34504 r34891  
    166166);
    167167
     168
     169
     170
     171
     172
     173
    168174require_once( ABSPATH . 'wp-admin/admin-header.php' );
    169175?>
  • trunk/src/wp-admin/edit-tags.php

    r34359 r34891  
    5454
    5555add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
     56
     57
     58
     59
     60
    5661
    5762$location = false;
  • trunk/src/wp-admin/edit.php

    r34177 r34891  
    246246    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    247247    );
    248 }
     248
     249}
     250
     251get_current_screen()->set_screen_reader_content( array(
     252    'heading_views'      => $post_type_object->labels->views,
     253    'heading_pagination' => $post_type_object->labels->pagination,
     254    'heading_list'       => $post_type_object->labels->list,
     255) );
    249256
    250257add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r34508 r34891  
    444444        $this->display_tablenav( 'top' );
    445445
     446
     447
    446448?>
    447449<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r34728 r34891  
    382382        if ( empty( $views ) )
    383383            return;
     384
     385
    384386
    385387        echo "<ul class='subsubsub'>\n";
     
    735737        }
    736738
     739
     740
     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
    11201128?>
    11211129<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r34839 r34891  
    218218
    219219        $views = $this->get_views();
     220
     221
    220222?>
    221223<div class="wp-filter">
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r34760 r34891  
    259259        $views = apply_filters( "views_{$this->screen->id}", $views );
    260260
     261
    261262?>
    262263<div class="wp-filter">
     
    293294?>
    294295<div class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
    295 
     296<?php
     297    $this->screen->render_screen_reader_content( 'heading_list' );
     298?>
    296299    <div id="the-list"<?php echo $data_attr; ?>>
    297300        <?php $this->display_rows_or_placeholder(); ?>
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r34422 r34891  
    142142     */
    143143    private $_help_sidebar = '';
     144
     145
     146
     147
     148
     149
     150
     151
     152
    144153
    145154    /**
     
    643652    public function get_columns() {
    644653        return $this->columns;
     654
     655
     656
     657
     658
     659
     660
     661
     662
     663
     664
     665
     666
     667
     668
     669
     670
     671
     672
     673
     674
     675
     676
     677
     678
     679
     680
     681
     682
     683
     684
     685
     686
     687
     688
     689
     690
     691
     692
     693
     694
     695
     696
     697
     698
     699
     700
     701
     702
     703
     704
     705
     706
     707
     708
     709
     710
     711
     712
     713
     714
     715
     716
     717
    645718    }
    646719
     
    10651138        <?php
    10661139    }
     1140
     1141
     1142
     1143
     1144
     1145
     1146
     1147
     1148
     1149
     1150
     1151
     1152
     1153
     1154
     1155
    10671156}
  • trunk/src/wp-admin/link-manager.php

    r33067 r34891  
    6262);
    6363
     64
     65
     66
     67
    6468include_once( ABSPATH . 'wp-admin/admin-header.php' );
    6569
  • trunk/src/wp-admin/network/site-themes.php

    r33921 r34891  
    3333    '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
    3434);
     35
     36
     37
     38
     39
     40
    3541
    3642$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
  • trunk/src/wp-admin/network/site-users.php

    r34742 r34891  
    3636    '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
    3737);
     38
     39
     40
     41
     42
     43
    3844
    3945$_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] );
  • trunk/src/wp-admin/network/sites.php

    r33194 r34891  
    4646    '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
    4747);
     48
     49
     50
     51
     52
    4853
    4954$id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
  • trunk/src/wp-admin/network/themes.php

    r34778 r34891  
    252252);
    253253
     254
     255
     256
     257
     258
     259
    254260$title = __('Themes');
    255261$parent_file = 'themes.php';
  • trunk/src/wp-admin/network/users.php

    r34265 r34891  
    173173);
    174174
     175
     176
     177
     178
     179
     180
    175181require_once( ABSPATH . 'wp-admin/admin-header.php' );
    176182
  • trunk/src/wp-admin/plugin-install.php

    r33067 r34891  
    8989);
    9090
     91
     92
     93
     94
     95
     96
    9197/**
    9298 * WordPress Administration Template Header.
  • trunk/src/wp-admin/plugins.php

    r34778 r34891  
    427427);
    428428
     429
     430
     431
     432
     433
     434
    429435$title = __('Plugins');
    430436$parent_file = 'plugins.php';
  • trunk/src/wp-admin/theme-install.php

    r34086 r34891  
    128128    <?php install_themes_upload(); ?>
    129129    </div>
     130
     131
    130132
    131133    <div class="wp-filter">
     
    172174        </div>
    173175    </div>
     176
    174177    <div class="theme-browser content-filterable"></div>
    175178    <div class="theme-install-overlay wp-full-overlay expanded"></div>
  • trunk/src/wp-admin/upload.php

    r34797 r34891  
    205205);
    206206
     207
     208
     209
     210
     211
     212
    207213require_once( ABSPATH . 'wp-admin/admin-header.php' );
    208214?>
  • trunk/src/wp-admin/users.php

    r34636 r34891  
    6868    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    6969);
     70
     71
     72
     73
     74
     75
    7076
    7177if ( empty($_REQUEST) ) {
  • trunk/src/wp-includes/post-functions.php

    r34886 r34891  
    13231323 * - use_featured_image - Default is Use as featured image.
    13241324 * - menu_name - Default is the same as `name`.
     1325
     1326
     1327
    13251328 *
    13261329 * Above, the first default value is for non-hierarchical post types (like posts)
     
    13571360        'remove_featured_image' => array( __( 'Remove featured image' ), __( 'Remove featured image' ) ),
    13581361        'use_featured_image' => array( __( 'Use as featured image' ), __( 'Use as featured image' ) ),
     1362
     1363
     1364
    13591365    );
    13601366    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
  • trunk/src/wp-includes/taxonomy-functions.php

    r34884 r34891  
    496496 * - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
    497497 * - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables.
     498
     499
    498500 *
    499501 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
     
    535537        'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
    536538        'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
     539
     540
    537541    );
    538542    $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
Note: See TracChangeset for help on using the changeset viewer.