[wp-trac] [WordPress Trac] #33513: Add support for the 'lang' attribute in admin bar menu items.

WordPress Trac noreply at wordpress.org
Wed Aug 26 07:14:35 UTC 2015


#33513: Add support for the 'lang' attribute in admin bar menu items.
-------------------------+------------------------------
 Reporter:  Chouby       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Toolbar      |     Version:  3.3
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  accessibility
-------------------------+------------------------------

Comment (by rianrietveld):

 @Chouby
 In this case the `lang` attribute is added to a link.
 If you want to tell a screen reader what language to expect after
 selecting a link, you should use the attribute `hreflang`.
 So in this case use `hreflang`.
 W3C specs: http://www.w3.org/TR/html5/links.html#links-created-by-a-and-
 area-elements
 But it's It is purely advisory, not a requirement.

 The attribute `lang` is used to identify a language within an element, for
 example if you use a quote in another language, you will use:

 {{{
 <blockquote lang="nl">
 Dikkertje Dap. Dikkertje Dap klom op de trap. 's Morgens vroeg om kwart
 over zeven. Om de giraf een klontje te geven.
 <blockquote>
 }}}


 Then a screen reader can switch language/voice.
 This is only used for more than 2 words, because the switching of a voice
 will take some time and that's irritating for small pieces of text.

 @morganestes
 Can you give an example where this is useful?

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


More information about the wp-trac mailing list