[wp-trac] [WordPress Trac] #25459: Provide more meaningful links in Edit Post/Page

WordPress Trac noreply at wordpress.org
Tue Nov 26 20:09:59 UTC 2013


#25459: Provide more meaningful links in Edit Post/Page
-------------------------------------+--------------------
 Reporter:  grahamarmfield           |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  low                      |   Milestone:  3.8
Component:  Accessibility            |     Version:  3.6.1
 Severity:  minor                    |  Resolution:
 Keywords:  needs-patch i18n-change  |
-------------------------------------+--------------------

Comment (by neil_pie):

 During the discussion on this at the contributor day, it was brought up
 that it might be an idea to add a core function outputting the two
 accessibility phrases in short and long form. Something like:

  {{{
 function wpa11y( $longform, $shortform ) {
     return '<span aria-hidden="true">' . $shortform . '</span><span class
 ="screen-reader-text">' . $longform . '</span>';
 }
 }}}

 Some reasons behind this thinking:

 * There are so many places in the admin where this kind of 'shortform
 verb, longform verb + subject' technique would improve accessibility, a
 standardised function makes sense
 * It would provide a function available to themes and plugins to provide a
 'current best practice method' for achieving this accessible result
 * The functionality we are trying to achieve is described in the spec for
 aria-label and/or aria-labelledby attributes. Unfortunately,  assistive
 technology is slow to keep up. This lack of support is the reason we need
 to use two <span> elements. Controlling this markup within a function
 would enable us to change the output more easily in the future when the
 ARIA attributes have greater support.

 something like the following ( although I'm not 100% sure that this would
 be the correct markup. Just an example:

 {{{
 function wpa11y( $longform, $shortform ) {
     return '<span aria-label="' . $longform . "">' . $shortform .
 '</span>';
 }
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25459#comment:31>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list