Closed Bug 1894410 Opened 2 years ago Closed 2 months ago

L10n for role strings containing spaces on Android is broken

Categories

(Core :: Disability Access APIs, defect)

ARM64
Android
defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox-esr153 --- wontfix
firefox125 --- wontfix
firefox126 --- wontfix
firefox127 --- wontfix
firefox128 --- wontfix
firefox154 --- wontfix
firefox155 --- wontfix
firefox156 --- fixed

People

(Reporter: Jamie, Assigned: eeejay)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

I haven't verified this, but I'm fairly sure that our localisation of role strings for Android a11y is broken and has been for several years, since bug 1479037.

  1. We use the unmodified Gecko role string as the key for l10n.
  2. However, some of our role strings contain spaces, but all of the l10n keys have spaces stripped.
  3. It looks like the old JS code did strip spaces, so this was probably just an oversight when the code was converted to native in bug 1479037 (and perpetuated in refactors thereafter).

I'm not sure whether it is required/ideal for string bundle keys to have no spaces or not. It does seem that no bundle contains spaces in its keys except for "click ancestor" in the accessible bundle, which we might need to look at. Regardless, we probably don't want to change the keys used because that would break all of our translations, so we should probably just make the C++ code strip spaces from the role before using it as a bundle key.

We have nsTSubstring::StripWhitespace, so it's probably easiest to use that. The role string is currently a literal, so we'll need to wrap it in an nsAutoString or similar first.

Summary: L10n for role strings on Android is broken → L10n for role strings containing spaces on Android is broken

Set release status flags based on info from the regressing bug 1479037

:eeejay, since you are the author of the regressor, bug 1479037, could you take a look?

For more information, please visit BugBot documentation.

Set release status flags based on info from the regressing bug 1479037

This has regressed for a very long time. No user impact here is minimal so I suggest it just ride the trains.

Flags: needinfo?(eitan)
Assignee: nobody → eitan
Status: NEW → ASSIGNED
Pushed by eisaacson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/767bc9520c96 https://hg.mozilla.org/integration/autoland/rev/0eb38e65a908 Remove whitespace from role string tokens before localizing. r=Jamie,geckoview-reviewers,m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
QA Whiteboard: [qa-triage-done-c157/b156]
Depends on: 2070639
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: