WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 8 months 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
Milestone: 4.9.1 Priority: normal
Severity: normal Version: 4.7
Component: Users Keywords:
Focuses: accessibility, administration Cc:

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 months ago.

Download all attachments as: .zip

Change History (17)

#1 @afercia
9 months ago

  • Focuses accessibility added

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

#2 @afercia
9 months 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 months 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 months ago

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

@ocean90
9 months ago

#5 @ocean90
9 months ago

  • Keywords has-patch added; needs-patch removed

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


8 months ago

#7 @afercia
8 months ago

  • Milestone changed from Awaiting Review to 4.9.1

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

#8 @johnbillion
8 months ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to 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
8 months ago

  • Keywords fixed-major added; has-screenshots has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

#10 @johnbillion
8 months ago

  • Resolution set to fixed
  • Status changed from reopened to 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.


8 months ago

#12 @johnbillion
8 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

#13 @johnbillion
8 months ago

  • Status changed from reopened to accepted

#14 @johnbillion
8 months 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
8 months 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
8 months ago

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