Make WordPress Core


Ignore:
Timestamp:
12/19/2015 12:16:30 AM (8 years ago)
Author:
afercia
Message:

Accessibility: Remove title attributes and improve accessibility on the "no-js" Menus screen.

When JavaScript is off, the reorder menu item and Edit menu item links now use aria-label
attributes instead of title attributes.

Fixes #35134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php

    r35382 r36016  
    127127                                    'move-menu_item'
    128128                                );
    129                             ?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up'); ?>">&#8593;</abbr></a>
     129                            ?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">&#8593;</a>
    130130                            |
    131131                            <a href="<?php
     
    140140                                    'move-menu_item'
    141141                                );
    142                             ?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">&#8595;</abbr></a>
     142                            ?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">&#8595;</a>
    143143                        </span>
    144                         <a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php esc_attr_e('Edit Menu Item'); ?>" href="<?php
     144                        <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
    145145                            echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
    146                         ?>"><?php _e( 'Edit Menu Item' ); ?></a>
     146                        ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a>
    147147                    </span>
    148148                </div>
Note: See TracChangeset for help on using the changeset viewer.