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.
Fixes #48406.

git-svn-id: https://develop.svn.wordpress.org/trunk@46770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
SergeyBiryukov 2019-11-24 19:55:01 +00:00
parent 5e801fe58e
commit dc486308e6
2 changed files with 19 additions and 19 deletions

View File

@ -130,7 +130,7 @@
color: #72777c;
}
.welcome-panel a {
.welcome-panel li a {
text-decoration: none;
}
@ -260,6 +260,16 @@
top: -2px;
}
.welcome-panel .welcome-widgets:before {
content: "\f538";
top: -2px;
}
.welcome-panel .welcome-menus:before {
content: "\f163";
top: -2px;
}
.welcome-panel .welcome-comments:before {
content: "\f117";
top: -1px;
@ -886,8 +896,9 @@ body #dashboard-widgets .postbox form .submit {
min-width: 0;
}
#dashboard-widgets a,
#dashboard-widgets .button-link {
#dashboard-widgets li a,
#dashboard-widgets .button-link,
.community-events-footer a {
text-decoration: none;
}

View File

@ -1797,22 +1797,11 @@ function wp_welcome_panel() {
<div class="welcome-panel-column welcome-panel-last">
<h3><?php _e( 'More Actions' ); ?></h3>
<ul>
<?php
if ( current_theme_supports( 'widgets' ) || current_theme_supports( 'menus' ) ) :
if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
$widgets_menus_link = sprintf(
/* translators: 1: URL to Widgets screen, 2: URL to Menus screen. */
__( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
admin_url( 'widgets.php' ),
admin_url( 'nav-menus.php' )
);
} elseif ( current_theme_supports( 'widgets' ) ) {
$widgets_menus_link = '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
} else {
$widgets_menus_link = '<a href="' . admin_url( 'nav-menus.php' ) . '">' . __( 'Manage menus' ) . '</a>';
}
?>
<li><div class="welcome-icon welcome-widgets-menus"><?php echo $widgets_menus_link; ?></div></li>
<?php if ( current_theme_supports( 'widgets' ) ) : ?>
<li><?php printf( '<a href="%s" class="welcome-icon welcome-widgets">' . __( 'Manage widgets' ) . '</a>', admin_url( 'widgets.php' ) ); ?></li>
<?php endif; ?>
<?php if ( current_theme_supports( 'menus' ) ) : ?>
<li><?php printf( '<a href="%s" class="welcome-icon welcome-menus">' . __( 'Manage menus' ) . '</a>', admin_url( 'nav-menus.php' ) ); ?></li>
<?php endif; ?>
<?php if ( current_user_can( 'manage_options' ) ) : ?>
<li><?php printf( '<a href="%s" class="welcome-icon welcome-comments">' . __( 'Turn comments on or off' ) . '</a>', admin_url( 'options-discussion.php' ) ); ?></li>