commit 0788fbec1f47593b272f28cdd58856706ed01bac
parent 2404bc32e3297ad022e8fa61ca6168fa63f74b7b
Author: Emma Zuehlcke <emz@mozilla.com>
Date: Mon, 1 Dec 2025 12:05:58 +0000
Bug 1999685 - Add missing label to history mode select. r=fluent-reviewers,hjones,flod
Differential Revision: https://phabricator.services.mozilla.com/D272459
Diffstat:
4 files changed, 47 insertions(+), 11 deletions(-)
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
@@ -2545,8 +2545,8 @@ SettingGroupManager.registerGroups({
],
controlAttrs: {
"search-l10n-ids": `
- history-remember-description2,
- history-dontremember-description2,
+ history-remember-description3,
+ history-dontremember-description3,
history-private-browsing-permanent.label,
history-remember-browser-option.label,
history-remember-search-option.label,
diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js
@@ -2145,11 +2145,11 @@ Preferences.addSetting({
getControlConfig(config, { privateBrowsingAutoStart }, setting) {
let l10nId = null;
if (setting.value == "remember") {
- l10nId = "history-remember-description2";
+ l10nId = "history-remember-description3";
} else if (setting.value == "dontremember") {
- l10nId = "history-dontremember-description2";
+ l10nId = "history-dontremember-description3";
} else if (setting.value == "custom") {
- l10nId = "history-custom-description";
+ l10nId = "history-custom-description3";
}
let dontRememberOption = config.options.find(
diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1302,8 +1302,7 @@ history-header = History
# - Simply as "Firefox", moving the verb into each option.
# This will result in "Firefox" + "Will remember history", etc.
# - As a stand-alone message, for example "Firefox history settings:".
-history-remember-label = { -brand-short-name } will
- .accesskey = w
+history-remember-label2 = { -brand-short-name } will
history-remember-option-all =
.label = Remember history
@@ -1312,13 +1311,16 @@ history-remember-option-never =
history-remember-option-custom =
.label = Use custom settings for history
-history-remember-description2 =
- .description ={ -brand-short-name } will remember your browsing, download, form, and search history.
+history-remember-description3 =
+ .aria-label = { history-remember-label2 }
+ .description = { -brand-short-name } will remember your browsing, download, form, and search history.
-history-dontremember-description2 =
+history-dontremember-description3 =
+ .aria-label = { history-remember-label2 }
.description = { -brand-short-name } will use the same settings as private browsing, and will not remember any history as you browse the Web.
-history-custom-description =
+history-custom-description3 =
+ .aria-label = { history-remember-label2 }
.description = { -brand-short-name } will use custom settings for your browsing, download, form and search history.
history-private-browsing-permanent =
diff --git a/python/l10n/fluent_migrations/bug_1999685_preferences_history_mode_label.py b/python/l10n/fluent_migrations/bug_1999685_preferences_history_mode_label.py
@@ -0,0 +1,34 @@
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from fluent.migrate import COPY_PATTERN
+from fluent.migrate.helpers import transforms_from
+
+
+def migrate(ctx):
+ """Bug 1999685 - Migrate history descriptions to new IDs with aria-labels, part {index}."""
+ source = "browser/browser/preferences/preferences.ftl"
+ target = source
+
+ ctx.add_transforms(
+ target,
+ source,
+ transforms_from(
+ """
+history-remember-label2 = {COPY_PATTERN(from_path, "history-remember-label")}
+
+history-remember-description3 =
+ .aria-label = { history-remember-label2 }
+ .description = {COPY_PATTERN(from_path, "history-remember-description2.description")}
+
+history-dontremember-description3 =
+ .aria-label = { history-remember-label2 }
+ .description = {COPY_PATTERN(from_path, "history-dontremember-description2.description")}
+
+history-custom-description3 =
+ .aria-label = { history-remember-label2 }
+ .description = {COPY_PATTERN(from_path, "history-custom-description.description")}
+""",
+ from_path=source,
+ ),
+ )