[wp-trac] [WordPress Trac] #48996: Add lang attribute to the content in the backend

WordPress Trac noreply at wordpress.org
Mon Dec 16 09:52:20 UTC 2019


#48996: Add lang attribute to the content in the backend
-------------------------------+------------------------------
 Reporter:  Chouby             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  I18N               |     Version:  4.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  accessibility
-------------------------------+------------------------------

Comment (by Chouby):

 Hi @audrasjb,

 Yes I am referring to backend pages mixing languages. It will be probably
 clearer with an example. Let say that the site's language defined in
 Settings > General is set to `en_US`. Then I select `fr_FR` in my user
 profile. The backend language is set to French and the html tag is
 correctly set to:
 {{{
 <html xmlns="http://www.w3.org/1999/xhtml" class="wp-toolbar" lang="fr-
 FR">
 }}}
 Now if I go to the posts list table, there is an issue. All the posts
 titles, categories, tags will be read in French, although the content of
 the website is in English. I would expect that the html tags wrapping them
 is assigned a `lang="en_US"` attribute so that they are read in the
 correct language.

 I took this example because it's probably one of the harder to handle. In
 this page, the language would very often switch between the content's
 language and the backend language. I am not sure that's correctly handled
 by screeen readers.

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


More information about the wp-trac mailing list