Make WordPress Core

Changeset 35273


Ignore:
Timestamp:
10/19/2015 10:03:48 PM (11 years ago)
Author:
afercia
Message:

Accessibility: Improve the headings hierarchy in the Add Themes screen.

Fixes #33819.

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

Legend:

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

    r35219 r35273  
    11271127        -moz-box-sizing: border-box;
    11281128        box-sizing: border-box;
     1129        position: relative;
    11291130        float: left;
    11301131        margin: 0 1% 0 0;
    1131         padding: 10px;
     1132        padding: 20px 10px 10px;
    11321133        width: 24%;
    11331134        background: #fff;
    … …  
    11371138}
    11381139
    1139 .filter-group h4 {
    1140         position: relative;
     1140.filter-group legend {
     1141        position: absolute;
     1142        top: 10px;
     1143        display: block;
    11411144        margin: 0;
    1142 }
    1143 
    1144 .filter-drawer ol {
    1145         margin: 20px 0 0;
     1145        padding: 0;
     1146        font-size: 1em;
     1147        font-weight: 600;
     1148}
     1149
     1150.filter-drawer .filter-group-feature {
     1151        margin: 28px 0 0;
    11461152        list-style-type: none;
    11471153        font-size: 12px;
    11481154}
    11491155
    1150 .filter-drawer li {
     1156.filter-drawer .filter-group-feature input,
     1157.filter-drawer .filter-group-feature label {
    11511158        display: inline-block;
    1152         vertical-align: top;
    1153         margin: 5px 0;
    1154         padding-right: 25px;
    1155         width: 160px;
    1156         list-style-type: none;
     1159        margin: 7px 4px 7px 0;
     1160        line-height: 16px;
    11571161}
    11581162
    … …  
    35193523                margin: 2px 0 0;
    35203524        }
     3525
     3526        .filter-drawer .filter-group-feature input,
     3527        .filter-drawer .filter-group-feature label {
     3528                line-height: 25px;
     3529        }
    35213530}
    35223531
  • trunk/src/wp-admin/css/ie.css

    r32984 r35273  
    397397}
    398398
    399 #widget-list .widget,
    400 .feature-filter .feature-group li {
     399#widget-list .widget {
    401400        display: inline;
    402 }
    403 
    404 .feature-filter .feature-group li input {
    405         vertical-align: middle;
    406401}
    407402
    … …  
    696691}
    697692
    698 * html .feature-filter .feature-group li {
    699         width: 145px;
    700 }
    701 
    702693* html div.widget-liquid-left {
    703694        width: 99%;
  • trunk/src/wp-admin/js/theme.js

    r33820 r35273  
    961961
    962962                // Make sure the add-new stays at the end
    963                 if ( page >= 1 ) {
     963                if ( ! themes.isInstall && page >= 1 ) {
    964964                        $( '.add-new-theme' ).remove();
    965965                }
    … …  
    983983
    984984                // 'Add new theme' element shown at the end of the grid
    985                 if ( themes.data.settings.canInstall ) {
     985                if ( ! themes.isInstall && themes.data.settings.canInstall ) {
    986986                        this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + l10n.addNew + '</h2></a></div>' );
    987987                }
  • trunk/src/wp-admin/theme-install.php

    r35006 r35273  
    154154                $feature_list = get_theme_feature_list();
    155155                foreach ( $feature_list as $feature_name => $features ) {
    156                         echo '<div class="filter-group">';
     156                        echo '<fieldset class="filter-group">';
    157157                        $feature_name = esc_html( $feature_name );
    158                         echo '<h4>' . $feature_name . '</h4>';
    159                         echo '<ol class="feature-group">';
     158                        echo '<legend>' . $feature_name . '</legend>';
     159                        echo '<div class="filter-group-feature">';
    160160                        foreach ( $features as $feature => $feature_name ) {
    161161                                $feature = esc_attr( $feature );
    162                                 echo '<li><input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
    163                                 echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label></li>';
     162                                echo '<input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
     163                                echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label><br>';
    164164                        }
    165                         echo '</ol>';
    166165                        echo '</div>';
     166                        echo '</fieldset>';
    167167                }
    168168                ?>
Note: See TracChangeset for help on using the changeset viewer.