Make WordPress Core

Ticket #33646: 33646.patch

File 33646.patch, 2.9 KB (added by joedolson, 10 years ago)

Use fieldset/legend for screen options

  • wp-admin/css/common.css

     
    15241524        background-position: bottom left;
    15251525}
    15261526
    1527 #screen-options-wrap h5,
     1527#screen-options-wrap legend,
    15281528#contextual-help-wrap h5 {
    15291529        margin: 8px 0;
    15301530        font-size: 13px;
     1531        font-weight: 600;
    15311532}
    15321533
    15331534.metabox-prefs label {
  • wp-admin/includes/screen.php

     
    10881088                <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
    10891089                <form id="adv-settings" method="post">
    10901090                <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
    1091                         <h5><?php _e( 'Show on screen' ); ?></h5>
     1091                        <fieldset>
     1092                                <legend><?php _e( 'Show on screen' ); ?></legend>
    10921093                <?php
    10931094                endif;
    10941095
     
    11141115                                <br class="clear" />
    11151116                        </div>
    11161117                        <?php endif;
     1118                       
     1119                        if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
     1120                                </fieldset>
     1121                        <?php endif;                   
    11171122                        if ( $columns ) :
    11181123                                if ( ! empty( $columns['_title'] ) ) : ?>
    1119                         <h5><?php echo $columns['_title']; ?></h5>
     1124                        <fieldset>
     1125                                <legend><?php echo $columns['_title']; ?></legend>
    11201126                        <?php endif; ?>
    11211127                        <div class="metabox-prefs">
    11221128                                <?php
     
    11391145                                ?>
    11401146                                <br class="clear" />
    11411147                        </div>
     1148                        <?php if ( ! empty( $columns['_title'] ) ) : ?>
     1149                        </fieldset>
     1150                        <?php endif; ?>                 
    11421151                <?php endif;
    11431152
    11441153                $this->render_screen_layout();
     
    11651174                $num = $this->get_option( 'layout_columns', 'max' );
    11661175
    11671176                ?>
    1168                 <h5 class="screen-layout"><?php _e('Screen Layout'); ?></h5>
    1169                 <div class='columns-prefs'><?php
    1170                         _e('Number of Columns:');
    1171                         for ( $i = 1; $i <= $num; ++$i ):
    1172                                 ?>
    1173                                 <label class="columns-prefs-<?php echo $i; ?>">
    1174                                         <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
    1175                                                 <?php checked( $screen_layout_columns, $i ); ?> />
    1176                                         <?php echo esc_html( $i ); ?>
    1177                                 </label>
    1178                                 <?php
    1179                         endfor; ?>
     1177                <fieldset>
     1178                <legend class="screen-layout"><?php _e('Screen Layout'); ?></legend>
     1179                <div class='columns-prefs'>
     1180                        <span id='number-of-columns'><?php _e('Number of Columns:'); ?></span><?php
     1181                                for ( $i = 1; $i <= $num; ++$i ):
     1182                                        ?>
     1183                                        <label class="columns-prefs-<?php echo $i; ?>">
     1184                                                <input type='radio' name='screen_columns' aria-describedby='number-of-columns' value='<?php echo esc_attr( $i ); ?>'
     1185                                                        <?php checked( $screen_layout_columns, $i ); ?> />
     1186                                                <?php echo esc_html( $i ); ?>
     1187                                        </label>
     1188                                        <?php
     1189                                endfor; ?>
    11801190                </div>
     1191                </fieldset>
    11811192                <?php
    11821193        }
    11831194