Open Bug 1175132 Opened 9 years ago Updated 2 years ago

Firefox UI: Missing lang attribute causes CSS text transformations to fail

Categories

(Firefox :: General, defect)

defect

Tracking

()

REOPENED

People

(Reporter: flod, Unassigned)

References

Details

Attachments

(1 file)

Attached file Simple test
Starting from Firefox General, not sure if there's a more appropriate place for this.

We had several discussions in the past about discouraging the use of text transformations (uppercase, small-caps) in Firefox UI. 
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#CSS_issues

One recent example is bug 992637, where sub-panels in the menu are using font-variant: small-caps, or bug 1164594, that fixed the New tab controls (text-transform: uppercase).

The "New tab controls" capitalization failed for Turkish (bug 1171839), and that's because we're not associating a lang attribute to the document.

See the attachment, and how the result changes when lang="tr" is specified.
Should we just set lang to general.useragent.locale or is that not the right format?
(In reply to Dão Gottwald [:dao] from comment #1)
> Should we just set lang to general.useragent.locale or is that not the right
> format?

It might be the wrong value. We should use the same thing we use in some other frontend code to get the runtime locale being used for the browser/ chrome package. For example: https://hg.mozilla.org/mozilla-central/rev/d2b74b96a090
(the bug for that rev should have some examples of how that pref is not necessarily correct.)
See Also: → 1106119
Francesco, what's the scope here? Do we just need to add a lang attribute to about:newtab? Is there something else that needs to happen here?
Flags: needinfo?(francesco.lodolo)
(In reply to :Gijs Kruitbosch from comment #4)
> Francesco, what's the scope here? Do we just need to add a lang attribute to
> about:newtab? Is there something else that needs to happen here?

That would fix bug 1171839, it would probably make sense to check if there are other places where we use text transformations (small caps, uppercase) and make sure we specify a lang attribute.
Flags: needinfo?(francesco.lodolo)
This also affects appMenuRemoteTabs.label and appMenuHistory.label for Turkish.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: