Bug 1864606 - Fix missing label association for crash reports checkbox r=fluent-reviewers,Gijs,bolsson

Thanks to mhowell for the STRIP_ANCHOR function in the Fluent migration.

We were using the "for" attribute on a XUL label which does not behave
like an HTML label. This prevented the programmatic association
between the checkbox and the label. By utilizing moz-label, we maintain
the accesskey behavior of the previous XUL label.

Additionally we use moz-support-link to remove the
"collection-backlogged-crash-reports-link" Fluent string.

Differential Revision: https://phabricator.services.mozilla.com/D204557
This commit is contained in:
Tim Giles
2024-03-15 00:10:38 +00:00
parent 657bfed498
commit 4b1c3b2da6
6 changed files with 64 additions and 27 deletions

View File

@@ -985,11 +985,12 @@
<html:input type="checkbox"
id="automaticallySubmitCrashesBox"
preference="browser.crashReports.unsubmittedCheck.autoSubmit2"/>
<label for="automaticallySubmitCrashesBox"
<html:label is="moz-label"
for="automaticallySubmitCrashesBox"
id="crashReporterLabel"
data-l10n-id="collection-backlogged-crash-reports-with-link">
<html:a data-l10n-name="crash-reports-link" id="crashReporterLearnMore" target="_blank"/>
</label>
data-l10n-id="collection-backlogged-crash-reports"
data-l10n-attrs="accesskey"/>
<html:a id="crashReporterLearnMore" is="moz-support-link" class="learnMore"/>
</hbox>
#endif
</vbox>