Accessibility: Remove title attributes from the Meta widget.

- removes the `Powered by WordPress, state-of-the-art semantic personal publishing platform.` title attribute
- removes the title attribute from the abbreviations: contrary to a common belief, title attributes on abbreviations are only available to a minority of users, see https://developer.paciellogroup.com/blog/2019/03/short-note-the-abbreviation-appreciation-society/
- changes the term `RSS` to `feed`, as `RSS` is a technical term not all users are supposed to be familiar with
- improves the `widget_meta_poweredby` filter documentation

Props nishitlangaliya, chetan200891, audrasjb.
See #46980, #24766.
Fixes #46978.


git-svn-id: https://develop.svn.wordpress.org/trunk@45728 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2019-08-03 13:27:43 +00:00
parent f82b40a2d2
commit 882d3f5c16

View File

@ -56,24 +56,23 @@ class WP_Widget_Meta extends WP_Widget {
<ul> <ul>
<?php wp_register(); ?> <?php wp_register(); ?>
<li><?php wp_loginout(); ?></li> <li><?php wp_loginout(); ?></li>
<li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e( 'Entries <abbr title="Really Simple Syndication">RSS</abbr>' ); ?></a></li> <li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e( 'Entries feed' ); ?></a></li>
<li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e( 'Comments <abbr title="Really Simple Syndication">RSS</abbr>' ); ?></a></li> <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e( 'Comments feed' ); ?></a></li>
<?php <?php
/** /**
* Filters the "Powered by WordPress" text in the Meta widget. * Filters the "WordPress.org" list item HTML in the Meta widget.
* *
* @since 3.6.0 * @since 3.6.0
* @since 4.9.0 Added the `$instance` parameter. * @since 4.9.0 Added the `$instance` parameter.
* *
* @param string $title_text Default title text for the WordPress.org link. * @param string $html Default HTML for the WordPress.org list item.
* @param array $instance Array of settings for the current widget. * @param array $instance Array of settings for the current widget.
*/ */
echo apply_filters( echo apply_filters(
'widget_meta_poweredby', 'widget_meta_poweredby',
sprintf( sprintf(
'<li><a href="%s" title="%s">%s</a></li>', '<li><a href="%1$s">%2$s</a></li>',
esc_url( __( 'https://wordpress.org/' ) ), esc_url( __( 'https://wordpress.org/' ) ),
esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
__( 'WordPress.org' ) __( 'WordPress.org' )
), ),
$instance $instance