Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#42242 closed defect (bug) (fixed)

`lang` attribute in the admin area doesn't reflect a user's language setting

Reported by: johnbillion Owned by: johnbillion
Priority: normal Milestone: 4.9.1
Component: Users Version: 4.7
Severity: normal Keywords:
Cc: Focuses: accessibility, administration

Description

When a user chooses a Language in their user profile which differs from the Site Language on the General Settings screen, the lang attribute on the html element in the admin area is incorrect. It should reflect the user's language, but it reflects the site language.

Attachments (1)

42242.patch​ (545 bytes ) - added by ocean90 9 years ago.

Download all attachments as: .zip

Change History (17)

#1 @afercia
9 years ago

  • Focuses accessibility added

Adding the accessibility focus since the lang attribute is very important for screen readers.

#2 @afercia
9 years ago

  • Keywords has-screenshots added

@johnbillion I wasn't able to reproduce.
site language: Spanish
user language: Italian

What I get is lang="it-IT", Maybe an edge case with specific languages?

https://cldup.com/XxSy-he_64.png

#3 @johnbillion
9 years ago

Thanks for testing, Andrea. It appears the issue might only apply when the user language is set to English (United States) and the site language is set to something else, eg Italiano.

#4 @afercia
9 years ago

Oh yes, I can reproduce that with en-us as user lang. Thanks John.

#5 @ocean90
9 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in ​Slack in #accessibility by afercia. ​View the logs.


9 years ago

#7 @afercia
9 years ago

  • Milestone Awaiting Review → 4.9.1

It's a bug and there's a patch. Milestoning for 4.9.1 :)

#8 @johnbillion
9 years ago

  • Owner set to johnbillion
  • Resolution → fixed
  • Status new → closed

In 42220:

Users: Correct the value of the lang attribute in the admin area.

This corrects the value when the user's language is set to English (United States) but the site language is not.

Props ocean90, afercia

Fixes #42242

#9 @johnbillion
9 years ago

  • Keywords fixed-major added; has-screenshots has-patch removed
  • Resolution fixed
  • Status closed → reopened

#10 @johnbillion
9 years ago

  • Resolution → fixed
  • Status reopened → closed

In 42221:

Users: Correct the value of the lang attribute in the admin area.

This corrects the value when the user's language is set to English (United States) but the site language is not.

Props ocean90, afercia

Fixes #42242

Merges [42220] to the 4.9 branch.

This ticket was mentioned in ​Slack in #core-committers by obenland. ​View the logs.


9 years ago

#12 @johnbillion
9 years ago

  • Resolution fixed
  • Status closed → reopened

Reopening for backporting to 4.8 and 4.7 when the time comes.

#13 @johnbillion
9 years ago

  • Status reopened → accepted

#14 @johnbillion
9 years ago

In 42262:

Users: Correct the value of the lang attribute in the admin area.

This corrects the value when the user's language is set to English (United States) but the site language is not.

Props ocean90, afercia

See #42242

Merges [42220] to the 4.8 branch.

#15 @johnbillion
9 years ago

In 42263:

Users: Correct the value of the lang attribute in the admin area.

This corrects the value when the user's language is set to English (United States) but the site language is not.

Props ocean90, afercia

See #42242

Merges [42220] to the 4.7 branch.

#16 @johnbillion
9 years ago

  • Keywords fixed-major removed
  • Resolution → fixed
  • Status accepted → closed
Note: See TracTickets for help on using tickets.