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

WordPress Trac noreply at wordpress.org
Mon Nov 25 01:30:26 UTC 2013


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

 * keywords:  has-patch => needs-patch i18n-change


Comment:

 At WordCamp London Contributor Day the accessibility group done some
 research on this issue and we believe we have a solution. To recap the two
 main issues:

 Appending the noun as a separate word (for the benefit of screenreaders)
 is not acceptable for i18n. The following is not localisable in all
 languages because words and/or word order can change based on context:

 `<?php _e( 'Edit' ); ?> <?php _e( 'post date' ); ?>`

 Prepending the noun along with a colon is not acceptable for i18n either.
 The noun and/or the verb can change based on context, which this does not
 allow for:

 `<?php _e( 'Post date:' ); ?> <?php _e( 'Edit' ); ?>`

 The only solution from an i18n perspective is to provide both phrases (the
 one-word verb and the complete phrase) as complete strings.

 `<?php _e( 'Edit' ); ?>`
 `<?php _e( 'Edit post date' ); ?>`

 This means we need to hide the complete phrase from the browser UI, and
 also "hide" the one-word phrase from screenreaders and other assistive
 technology. After some testing the solution appears to be
 [http://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden the aria-
 hidden attribute]:

 > Indicates that the element and all of its descendants are not visible or
 perceivable to any user as implemented by the author.

 > Authors MAY, with caution, use aria-hidden to hide visibly rendered
 content from assistive technologies only if the act of hiding this content
 is intended to improve the experience for users of assistive technologies
 by removing redundant or extraneous content.

 Our links should end up structured like this:

 {{{
 <a href="#">
     <span aria-hidden="true"><?php _e( 'Edit' ); ?></span>
     <span class="screen-reader-text"><?php _e( 'Edit post date' );
 ?></span>
 </a>
 }}}

 The first span is shown in browser UIs but ignored by screenreaders. The
 second span is read by screenreaders but hidden in browser UIs.

 Graham Armfield done some testing at the contributor day and confirmed
 that this technique works with JAWS and NVDA on IE and Firefox (I'm not
 sure exactly which versions) on Win7, and provides a great benefit to
 screenreader users.

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


More information about the wp-trac mailing list