WordPress.org

Make WordPress Core

Changeset 46771


Ignore:
Timestamp:
11/24/2019 07:58:13 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Accessibility: Administration: Underline links on Dashboard that are located within a line of text and thus need to be underlined:

  • "change your theme completely"
  • Active theme in the "At a Glance" box
  • "View all drafts" in the Quick Draft box

Split "Manage widgets or menus" into separate items for consistency with other links.

For better accessibility, links that are a part of other text should be underlined and not rely on color alone to be distinguished.

Per accessibility coding standards:

When links can be identified as such by the context, for example because they’re part of a menu, or a set of links clearly identified as user interface controls, they don’t necessarily need to be underlined. In all the other cases, especially for links surrounded by other text (in a line or block of text), links need to be always underlined.

https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/#links-underline-or-no-underline
https://make.wordpress.org/accessibility/handbook/design/use-of-color/#not-by-color-alone

Props afercia, audrasjb, karmatosed.
Merges [46770] to the 5.3 branch.
Fixes #48406.

Location:
branches/5.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-admin/css/dashboard.css

    r46242 r46771  
    131131}
    132132
    133 .welcome-panel a {
     133.welcome-panel li a {
    134134    text-decoration: none;
    135135}
     
    261261}
    262262
     263.welcome-panel .welcome-widgets:before {
     264    content: "\f538";
     265    top: -2px;
     266}
     267
     268.welcome-panel .welcome-menus:before {
     269    content: "\f163";
     270    top: -2px;
     271}
     272
    263273.welcome-panel .welcome-comments:before {
    264274    content: "\f117";
     
    887897}
    888898
    889 #dashboard-widgets a,
    890 #dashboard-widgets .button-link {
     899#dashboard-widgets li a,
     900#dashboard-widgets .button-link,
     901.community-events-footer a {
    891902    text-decoration: none;
    892903}
  • branches/5.3/src/wp-admin/includes/dashboard.php

    r46451 r46771  
    17981798        <h3><?php _e( 'More Actions' ); ?></h3>
    17991799        <ul>
    1800         <?php
    1801         if ( current_theme_supports( 'widgets' ) || current_theme_supports( 'menus' ) ) :
    1802             if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
    1803                 $widgets_menus_link = sprintf(
    1804                     /* translators: 1: URL to Widgets screen, 2: URL to Menus screen. */
    1805                     __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
    1806                     admin_url( 'widgets.php' ),
    1807                     admin_url( 'nav-menus.php' )
    1808                 );
    1809             } elseif ( current_theme_supports( 'widgets' ) ) {
    1810                 $widgets_menus_link = '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
    1811             } else {
    1812                 $widgets_menus_link = '<a href="' . admin_url( 'nav-menus.php' ) . '">' . __( 'Manage menus' ) . '</a>';
    1813             }
    1814             ?>
    1815             <li><div class="welcome-icon welcome-widgets-menus"><?php echo $widgets_menus_link; ?></div></li>
     1800        <?php if ( current_theme_supports( 'widgets' ) ) : ?>
     1801            <li><?php printf( '<a href="%s" class="welcome-icon welcome-widgets">' . __( 'Manage widgets' ) . '</a>', admin_url( 'widgets.php' ) ); ?></li>
     1802        <?php endif; ?>
     1803        <?php if ( current_theme_supports( 'menus' ) ) : ?>
     1804            <li><?php printf( '<a href="%s" class="welcome-icon welcome-menus">' . __( 'Manage menus' ) . '</a>', admin_url( 'nav-menus.php' ) ); ?></li>
    18161805        <?php endif; ?>
    18171806        <?php if ( current_user_can( 'manage_options' ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.