Make WordPress Core

Changeset 35015


Ignore:
Timestamp:
10/10/2015 04:33:33 PM (9 years ago)
Author:
afercia
Message:

Accessibility: bump headings one level up on the Appearance > Widgets screen for a better headings hierarchy.

Props mrahmadawais, afercia.
Fixes #33659.

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

Legend:

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

    r34011 r35015  
    420420}
    421421
    422 #available-widgets .widget-title h4 {
     422#customize-controls .widget-title h3 {
     423    font-size: 1em;
     424}
     425
     426#available-widgets .widget-title h3 {
    423427    padding: 0 0 5px;
    424428    font-size: 14px;
     
    622626        margin-bottom: 15px;
    623627    }
    624     .widget-title h4 {
     628    .widget-title h3 {
    625629        padding: 13px 15px;
    626630    }
  • trunk/src/wp-admin/css/widgets.css

    r34893 r35015  
    2323}
    2424
     25.widget-title h3,
    2526.widget-title h4 {
    2627    margin: 0;
    2728    padding: 15px;
     29    font-size: 1em;
    2830    line-height: 1;
    2931    overflow: hidden;
     
    101103}
    102104
     105.sidebar-name h2,
    103106.sidebar-name h3 {
    104107    margin: 0;
     
    143146}
    144147
     148div#widgets-left .sidebar-name h2,
    145149div#widgets-left .sidebar-name h3 {
    146150    padding: 10px 0;
     
    244248}
    245249
     250div#widgets-right .sidebar-name h2,
    246251div#widgets-right .sidebar-name h3 {
    247252    padding: 15px 7px;
  • trunk/src/wp-admin/includes/widgets.php

    r34827 r35015  
    8282        <div class="sidebar-name">
    8383            <div class="sidebar-name-arrow"><br /></div>
    84             <h3><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h3>
     84            <h2><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h2>
    8585        </div>
    8686        <?php
     
    227227        </a>
    228228    </div>
    229     <div class="widget-title"><h4><?php echo $widget_title ?><span class="in-widget-title"></span></h4></div>
     229    <div class="widget-title"><h3><?php echo $widget_title; ?><span class="in-widget-title"></span></h3></div>
    230230    </div>
    231231
  • trunk/src/wp-admin/js/widgets.js

    r34165 r35015  
    298298                if ( ui.draggable.hasClass('ui-sortable-helper') ) {
    299299                    $('#removing-widget').show().children('span')
    300                     .html( ui.draggable.find('div.widget-title').children('h4').html() );
     300                    .html( ui.draggable.find( 'div.widget-title' ).children( 'h3' ).html() );
    301301                }
    302302            },
     
    311311        $( '#widgets-right .widgets-holder-wrap' ).each( function( index, element ) {
    312312            var $element = $( element ),
    313                 name = $element.find( '.sidebar-name h3' ).text(),
     313                name = $element.find( '.sidebar-name h2' ).text(),
    314314                id = $element.find( '.widgets-sortables' ).attr( 'id' ),
    315315                li = $('<li tabindex="0">').text( $.trim( name ) );
  • trunk/src/wp-admin/widgets.php

    r34714 r35015  
    245245    <h1><?php echo esc_html( $title ); ?></h1>
    246246    <div class="editwidget"<?php echo $width; ?>>
    247     <h3><?php printf( __( 'Widget %s' ), $name ); ?></h3>
     247    <h2><?php printf( __( 'Widget %s' ), $name ); ?></h2>
    248248
    249249    <form action="widgets.php" method="post">
     
    362362        <div class="sidebar-name">
    363363            <div class="sidebar-name-arrow"><br /></div>
    364             <h3><?php _e('Available Widgets'); ?> <span id="removing-widget"><?php _ex('Deactivate', 'removing-widget'); ?> <span></span></span></h3>
     364            <h2><?php _e( 'Available Widgets' ); ?> <span id="removing-widget"><?php _ex( 'Deactivate', 'removing-widget' ); ?> <span></span></span></h2>
    365365        </div>
    366366        <div class="widget-holder">
Note: See TracChangeset for help on using the changeset viewer.