[wp-trac] [WordPress Trac] #48996: Add lang attribute to the content in the backend
WordPress Trac
noreply at wordpress.org
Fri Jan 10 15:03:09 UTC 2020
#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 sabernhardt):
I see: this would accommodate a single-language site where an editor
prefers/needs a different language in the backend, and a filter would also
help plugins make adjustments for multi-lingual sites.
So far, I noticed that we should replace the `aria-label` for a post title
link (perhaps using screen-reader-text `span` instead?). The label
currently contains both the post's language (English in following example)
and the editor's preferred language (French):
{{{
<a class="row-title" href="http://localhost/wp3/wp-
admin/post.php?post=1&action=edit" aria-label="« Hello
world! » (Modifier)">Hello world!</a>
}}}
(The same also occurs on Pages, Categories and Tags title/name links.)
Below is a list of items that could be addressed with customized `lang`
attributes (likely not complete). For this ticket, we might want to focus
on the Posts list, and then reuse the filter for any other category we
want to tackle on another ticket.
Posts list (verify changes also affect Pages list and Custom Posts list)
1. Post title link
2. Links for categories, tags, and custom taxonomy terms
3. Content added to other columns (usually by a plugin), such as page
titles and meta descriptions
Media Editor input fields
1. Image alt text
2. Caption
3. Description
Taxonomy screens
1. Names and descriptions for any categories, tags and custom taxonomies
Menus and Widgets
1. Menu item names in `menu-item-title` span and `edit-menu-item-title`
input, post titles in post list, "original" links
2. Menu item description
3. Widget titles
4. Text widget content (maybe another widget as well, but supporting all
widgets could be tricky)
Comments
Setting these to the post's language would not be correct for every
comment, though it might be correct often enough to implement the change.
(Of course, allowing commenters to set their comment's language would be
helpful on the frontend, too, if we want to open a separate ticket to
explore that later.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48996#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list