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

WordPress Trac noreply at wordpress.org
Tue Dec 10 15:02:13 UTC 2013


#25459: Provide more meaningful links in Edit Post/Page
-----------------------------------------------+---------------------------
 Reporter:  grahamarmfield                     |       Owner:
     Type:  enhancement                        |      Status:  new
 Priority:  low                                |   Milestone:  Future
Component:  Accessibility                      |  Release
 Severity:  minor                              |     Version:  3.6.1
 Keywords:  i18n-change has-patch 2nd-opinion  |  Resolution:
-----------------------------------------------+---------------------------

Comment (by grahamarmfield):

 Replying to [comment:45 GaryJ]:
 > The function name seems tricky to nail down - either quite verbose, or
 unpredictably abbreviated.
 >
 > How about basing it on something that, as developers, we already know,
 such as the `img` `alt` attribute (which arguably has some parity to what
 is being covered here). i.e.:
 >
 > {{{
 > // Easy function name to remember
 > function alt( $display_text, $screen_reader_text ) {...}
 >
 > // or
 >
 > // Reversed arguments, so that you think of "alt text" e.g. "alt" first,
 then "text" after.
 > function alt_text( $screen_reader_text, $display_text ) {...}
 > }}}

 Sorry, I don't feel that is an appropriate name at all. This function has
 nothing to do with alt text which many people would take to mean the `alt`
 attribute. You couldn't successfully use this function with `alt` text.

 The function was originally proposed to solve the problems of less-than-
 meaningful link text by providing a way to provide two strings. Perhaps
 then the function should be called something like:

 {{{
 get_meaningful_links($short_text, $long_text, $class_name = 'screen-
 reader-text') {...}
 }}}

 (Note that I've kept the class-name parameter here as I'm intending to use
 this function in themes I build in the future.)

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


More information about the wp-trac mailing list