Make WordPress Core

Changeset 32984


Ignore:
Timestamp:
06/28/2015 05:45:49 AM (11 years ago)
Author:
SergeyBiryukov
Message:

List tables: Select All should not be a column header.

It sets a redundant relationship with all checkboxes in its column and also conveys wrong information for screen readers.

props afercia, valendesigns.
see #31654.

Location:
trunk/src/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r32977 r32984  
    472472}
    473473
    474 .widefat thead th {
     474.widefat thead th,
     475.widefat thead td {
    475476        border-bottom: 1px solid #e1e1e1;
    476477}
    477478
    478 .widefat tfoot th {
     479.widefat tfoot th,
     480.widefat tfoot td {
    479481        border-top: 1px solid #e1e1e1;
    480482        border-bottom: none;
     
    497499}
    498500
    499 .widefat th {
     501.widefat th,
     502.widefat thead td,
     503.widefat tfoot td {
    500504        text-align: left;
    501505        line-height: 1.3em;
     
    503507}
    504508
    505 .widefat th input {
     509.widefat th input,
     510.widefat thead td input,
     511.widefat tfoot td input {
    506512        margin: 0 0 0 8px;
    507513        padding: 0;
     
    515521}
    516522
    517 .widefat th input[type=checkbox] {
     523.widefat th input[type=checkbox],
     524.widefat thead td input[type=checkbox],
     525.widefat tfoot td input[type=checkbox] {
    518526        margin-top: -1px;
    519527}
     
    527535}
    528536
    529 .widefat thead th.check-column,
     537.widefat thead td.check-column,
    530538.widefat tbody th.check-column,
    531 .widefat tfoot th.check-column {
     539.widefat tfoot td.check-column {
    532540        padding: 11px 0 0 3px;
    533541}
    534542
    535 .widefat thead th.check-column {
     543.widefat thead td.check-column,
     544.widefat tfoot td.check-column {
    536545        padding-top: 10px;
    537546}
     
    715724#your-profile #rich_editing,
    716725.widefat thead th,
    717 .widefat tfoot th {
     726.widefat thead td,
     727.widefat tfoot th,
     728.widefat tfoot td {
    718729        line-height: 1.4em;
    719730}
     
    16881699}
    16891700
    1690 .widefat th {
     1701.widefat th,
     1702.widefat thead td,
     1703.widefat tfoot td {
    16911704        font-weight: normal;
    16921705}
    16931706
    16941707.widefat thead tr th,
    1695 .widefat tfoot tr th {
     1708.widefat thead tr td,
     1709.widefat tfoot tr th,
     1710.widefat tfoot tr td {
    16961711        color: #32373c;
    16971712}
  • trunk/src/wp-admin/css/forms.css

    r32777 r32984  
    945945        }
    946946
    947         input[type="checkbox"], .widefat th input[type="checkbox"] {
     947        input[type="checkbox"],
     948        .widefat th input[type="checkbox"],
     949        .widefat thead td input[type="checkbox"],
     950        .widefat tfoot td input[type="checkbox"] {
    948951                -webkit-appearance: none;
    949952                padding: 10px;
    950953        }
    951954
    952         .widefat th input[type="checkbox"] {
     955        .widefat th input[type="checkbox"],
     956        .widefat thead td input[type="checkbox"],
     957        .widefat tfoot td input[type="checkbox"] {
    953958                margin-bottom: 8px;
    954959        }
    955960
    956         input[type="checkbox"]:checked:before, .widefat th input[type="checkbox"]:before {
     961        input[type="checkbox"]:checked:before,
     962        .widefat th input[type="checkbox"]:before,
     963        .widefat thead td input[type="checkbox"]:before,
     964        .widefat tfoot td input[type="checkbox"]:before {
    957965                font: normal 30px/1 'Dashicons';
    958966                margin: -3px -5px;
  • trunk/src/wp-admin/css/ie.css

    r32677 r32984  
    485485
    486486.widefat tr,
    487 .widefat th {
     487.widefat th,
     488.widefat thead td,
     489.widefat tfoot td {
    488490        margin-bottom: 0;
    489491        border-spacing: 0;
    490492}
    491493
    492 .widefat th input {
     494.widefat th input,
     495.widefat thead td input,
     496.widefat tfoot td input {
    493497        margin: 0 0 0 5px;
    494498}
  • trunk/src/wp-admin/css/list-tables.css

    r32948 r32984  
    370370}
    371371
    372 #commentsdiv .comments-box thead th {
     372#commentsdiv .comments-box thead th,
     373#commentsdiv .comments-box thead td {
    373374        background: transparent;
    374375        padding: 0 7px 4px;
     
    10861087}
    10871088
    1088 .plugins thead th.check-column,
    1089 .plugins tfoot th.check-column,
     1089.plugins thead td.check-column,
     1090.plugins tfoot td.check-column,
    10901091.plugins .inactive th.check-column {
    10911092        padding-left: 6px;
    10921093}
    10931094
    1094 #update-plugins-table thead th.check-column,
    1095 #update-plugins-table tfoot th.check-column {
     1095#update-plugins-table thead td.check-column,
     1096#update-plugins-table tfoot td.check-column {
    10961097        padding-top: 11px;
    10971098}
     
    12361237        font-size: 13px;
    12371238        font-weight: normal;
    1238         margin: 6px 12px 12px;
    1239         padding: 6px 12px;
    12401239        margin: 0 10px 8px 31px;
     1240        padding: 6px 12px 8px 40px;
    12411241        background-color: #f7f7f7;
    12421242        background-color: rgba(0,0,0,0.03);
     
    12611261
    12621262.plugin-update-tr .update-message:before {
    1263         margin: 0 8px 0 -2px;
     1263        margin: 0 10px 0 -30px;
    12641264}
    12651265
     
    18341834        .wp-list-table.plugins {
    18351835                position: relative;
    1836                 margin-top: 35px;
    1837                 margin-bottom: 50px;
    1838         }
    1839 
    1840         .wp-list-table.plugins thead .column-description,
     1836                margin-bottom: 15px;
     1837        }
     1838
     1839        #wpbody-content .wp-list-table.plugins thead .column-description,
    18411840        #wpbody-content .wp-list-table.plugins tfoot .column-description,
    18421841        .wp-list-table.plugins th#description {
     
    18571856        }
    18581857
    1859         .wp-list-table.plugins thead,
    1860         .wp-list-table.plugins tfoot {
    1861                 position: absolute;
    1862                 top: -35px;
    1863                 left: 0;
    1864                 right: 0;
    1865                 width: auto;
    1866                 height: 35px;
    1867         }
    1868 
    1869         .wp-list-table.plugins tfoot {
    1870                 bottom: -35px;
    1871                 top: auto;
    1872         }
    1873 
    18741858        .active, .inactive {
    18751859                padding-top: 0;
     
    19171901        }
    19181902
     1903        .wp-list-table.plugins .manage-column.column-name {
     1904                padding-top: 11px;
     1905                padding-bottom: 12px;
     1906        }
     1907
     1908        .wp-list-table.plugins .manage-column.column-name.sortable {
     1909                padding: 4px 12px 4px 36px;
     1910        }
     1911
    19191912        .wp-list-table.plugins tr {
    19201913                position: relative;
     
    19221915
    19231916        .wp-list-table.plugins th.check-column,
     1917        .wp-list-table.plugins thead td.check-column,
     1918        .wp-list-table.plugins tfoot td.check-column,
    19241919        .wp-list-table.plugins tr.update th.check-column {
    19251920                position: absolute;
     
    19321927        }
    19331928
    1934         .wp-list-table.plugins thead th.check-column,
    1935         .wp-list-table.plugins tfoot th.check-column {
     1929        .wp-list-table.plugins thead td.check-column,
     1930        .wp-list-table.plugins tfoot td.check-column {
    19361931                padding-left: 3px;
    19371932                padding-top: 11px;
     
    19391934        }
    19401935
    1941         .widefat tbody th.check-column input[type="checkbox"] {
     1936        .plugins tbody th.check-column input[type="checkbox"] {
    19421937                margin-top: -3px;
    1943                 margin-left: 8px;
    1944         }
    1945 
    1946         .wp-list-table.plugins .active .check-column input,
    1947         .wp-list-table.plugins .update .check-column input {
     1938                margin-left: 9px;
     1939        }
     1940
     1941        .plugins tbody .active th.check-column input[type="checkbox"],
     1942        .plugins tbody .active.update th.check-column input[type="checkbox"] {
    19481943                margin-left: 5px;
    19491944        }
     
    19511946        .wp-list-table.plugins thead .check-column input,
    19521947        .wp-list-table.plugins tfoot .check-column input {
    1953                 margin-top: -6px;
     1948                margin-top: -2px;
     1949                margin-left: 8px;
    19541950        }
    19551951
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r32948 r32984  
    994994                        }
    995995
     996                        $tag = ( 'cb' === $column_key ) ? 'td' : 'th';
     997                        $scope = ( 'th' === $tag ) ? 'scope="col"' : '';
    996998                        $id = $with_id ? "id='$column_key'" : '';
    997999
     
    9991001                                $class = "class='" . join( ' ', $class ) . "'";
    10001002
    1001                         echo "<th scope='col' $id $class>$column_display_name</th>";
     1003                        echo "<$tag $scope $id $class>$column_display_name</$tag>";
    10021004                }
    10031005        }
Note: See TracChangeset for help on using the changeset viewer.