Make WordPress Core

Changeset 33483


Ignore:
Timestamp:
07/29/2015 09:49:55 AM (10 years ago)
Author:
ocean90
Message:

Customizer: Add an aria-expanded attribute to Edit menu item toggles.

props afercia.
fixes #33129.

Location:
trunk/src
Files:
3 edited

Legend:

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

    r33444 r33483  
    215215    height: 38px;
    216216    margin-right: 0 !important;
    217     text-indent: 100%;
    218217    outline: none;
    219218    overflow: hidden;
    220     white-space: nowrap;
    221219    cursor: pointer;
    222220}
     
    228226}
    229227
    230 /* Duplicates `.nav-menus-php .item-edit:before {}` in common.css:2220. */
    231 .wp-customizer .menu-item .item-edit:before {
    232     top: -1px;
    233     right: 0;
     228/* rework the arrow indicator implementation for NVDA bug same as #32715 */
     229.wp-customizer .menu-item .item-edit .toggle-indicator {
     230    display: inline-block;
     231    font-size: 20px;
     232    line-height: 1;
     233}
     234
     235.wp-customizer .menu-item .item-edit .toggle-indicator:after {
    234236    content: '\f140';
    235     border: none;
    236     background: none;
    237237    font: normal 20px/1 dashicons;
     238    color: #a0a5aa;
     239    vertical-align: top;
    238240    speak: none;
    239     display: block;
    240     padding: 0;
    241     text-indent: 0;
    242     text-align: center;
    243     position: relative;
    244241    -webkit-font-smoothing: antialiased;
    245242    -moz-osx-font-smoothing: grayscale;
     
    247244}
    248245
    249 .wp-customizer .menu-item.menu-item-edit-active .item-edit:before {
    250     content: '\f142';
    251 }
    252 
    253 .wp-customizer .menu-item .item-edit:before {
    254     line-height: 2;
    255 }
    256 
    257 /* Duplicates `.nav-menus-php .menu-item-edit-active .item-edit:before {}` in common.css:2271. */
    258 .wp-customizer .menu-item .menu-item-edit-active .item-edit:before {
     246.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
    259247    content: '\f142';
    260248}
  • trunk/src/wp-admin/js/customize-nav-menus.js

    r33413 r33483  
    13651365                };
    13661366
     1367                $menuitem.find( '.item-edit' ).attr( 'aria-expanded', 'true' );
    13671368                $inside.slideDown( 'fast', complete );
    13681369
     
    13781379                self.container.trigger( 'collapse' );
    13791380
     1381                $menuitem.find( '.item-edit' ).attr( 'aria-expanded', 'false' );
    13801382                $inside.slideUp( 'fast', complete );
    13811383            }
  • trunk/src/wp-includes/class-wp-customize-control.php

    r33413 r33483  
    16861686                </span>
    16871687                <span class="item-controls">
    1688                     <button type="button" class="not-a-button item-edit"><span class="screen-reader-text"><?php
     1688                    <button type="button" class="not-a-button item-edit" aria-expanded="false"><span class="screen-reader-text"><?php
    16891689                        /* translators: 1: Title of a menu item, 2: Type of a menu item */
    16901690                        printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
    1691                     ?></span></button>
     1691                    ?></span><span class="toggle-indicator" aria-hidden="true"></span></button>
    16921692                    <button type="button" class="not-a-button item-delete submitdelete deletion"><span class="screen-reader-text"><?php
    16931693                        /* translators: 1: Title of a menu item, 2: Type of a menu item */
Note: See TracChangeset for help on using the changeset viewer.