[wp-trac] [WordPress Trac] #47670: RSS widget creates an accessibility problem when used more than once

WordPress Trac noreply at wordpress.org
Tue Oct 1 11:32:51 UTC 2019


#47670: RSS widget creates an accessibility problem when used more than once
-----------------------------------------+----------------------------
 Reporter:  tpaw                         |       Owner:  audrasjb
     Type:  defect (bug)                 |      Status:  reviewing
 Priority:  normal                       |   Milestone:  5.3
Component:  Widgets                      |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:  accessibility
-----------------------------------------+----------------------------

Comment (by sabernhardt):

 It took me a while to realize that the two links have different URLs. The
 image link gives the feed URL itself, and the text link directs to the
 source's website.

 So the alt text could be something like this to accommodate multiple
 feeds:

 {{{
 sprintf( esc_attr__( 'Access Feed URL for %s' ), $title )
 }}}

 Another option: use that new text string as an aria-label instead (with
 the translated "RSS" as alt text), so anyone who might turn images off
 would not see the full title twice.

 {{{
 $title = '<a class="rsswidget" href="' . esc_url( $url ) . '" aria-
 label="' . sprintf( esc_attr__( 'Access Feed URL for %s' ), $title ) .
 '"><img class="rss-widget-icon" style="border:0" width="14" height="14"
 src="' . esc_url( $icon ) . '" alt="' . esc_attr__( 'RSS' ) . '" /></a> <a
 class="rsswidget" href="' . esc_url( $link ) . '">' . esc_html( $title ) .
 '</a>';
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47670#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list