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.

Built from https://develop.svn.wordpress.org/trunk@45728


git-svn-id: http://core.svn.wordpress.org/trunk@45539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2019-08-03 13:28:57 +00:00
parent 7b45746001
commit cbd6b7b5bc
2 changed files with 7 additions and 8 deletions

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45727'; $wp_version = '5.3-alpha-45728';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

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