WordPress.org

Make WordPress Core

Opened 5 weeks ago

Last modified 7 days ago

#42242 new defect (bug)

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

Reported by: johnbillion Owned by:
Milestone: 4.9.1 Priority: normal
Severity: normal Version: 4.7
Component: Users Keywords: has-screenshots has-patch
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 5 weeks ago.

Download all attachments as: .zip

Change History (8)

#1 @afercia
5 weeks ago

  • Focuses accessibility added

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

#2 @afercia
5 weeks 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
5 weeks 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
5 weeks ago

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

@ocean90
5 weeks ago

#5 @ocean90
5 weeks ago

  • Keywords has-patch added; needs-patch removed

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


7 days ago

#7 @afercia
7 days ago

  • Milestone changed from Awaiting Review to 4.9.1

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

Note: See TracTickets for help on using tickets.