From 7368ed48d392b48a6862ffa1cd45a8986022e13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 16 Mar 2022 23:03:49 +0000 Subject: [PATCH] Bug 1759925 - Allow aria-description as a globally safe l10n attribute. r=Gijs We had precedents for this and it is safe to allow it everywhere. Depends on D141276 Differential Revision: https://phabricator.services.mozilla.com/D141277 --- .../newtab/aboutwelcome/content/aboutwelcome.bundle.js | 7 ++----- .../content-src/aboutwelcome/components/Colorways.jsx | 2 -- .../newtab/content-src/aboutwelcome/components/Themes.jsx | 1 - dom/l10n/L10nOverlays.cpp | 3 ++- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/browser/components/newtab/aboutwelcome/content/aboutwelcome.bundle.js b/browser/components/newtab/aboutwelcome/content/aboutwelcome.bundle.js index 42ca94f68f33..491b0aa9c7b1 100644 --- a/browser/components/newtab/aboutwelcome/content/aboutwelcome.bundle.js +++ b/browser/components/newtab/aboutwelcome/content/aboutwelcome.bundle.js @@ -1059,8 +1059,7 @@ const VariationsCircle = props => { checked: activeTheme === null || activeTheme === void 0 ? void 0 : activeTheme.includes(id), name: "variationSelect", className: "sr-only input", - onClick: setVariation, - "data-l10n-attrs": "aria-description" + onClick: setVariation })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MSLocalized__WEBPACK_IMPORTED_MODULE_1__["Localized"], { text: label }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { @@ -1172,7 +1171,6 @@ function Colorways(props) { checked: colorwayId === id, className: "sr-only input", onClick: handleColorwayClick, - "data-l10n-attrs": "aria-description", "data-l10n-args": JSON.stringify({ colorwayName: label }), @@ -1233,8 +1231,7 @@ const Themes = props => { name: "theme", checked: theme === props.activeTheme, className: "sr-only input", - onClick: props.handleAction, - "data-l10n-attrs": "aria-description" + onClick: props.handleAction })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: `icon ${theme === props.activeTheme ? " selected" : ""} ${theme}` }), label && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MSLocalized__WEBPACK_IMPORTED_MODULE_1__["Localized"], { diff --git a/browser/components/newtab/content-src/aboutwelcome/components/Colorways.jsx b/browser/components/newtab/content-src/aboutwelcome/components/Colorways.jsx index 3c91158497b1..b39bced80898 100644 --- a/browser/components/newtab/content-src/aboutwelcome/components/Colorways.jsx +++ b/browser/components/newtab/content-src/aboutwelcome/components/Colorways.jsx @@ -41,7 +41,6 @@ export const VariationsCircle = props => { name="variationSelect" className="sr-only input" onClick={setVariation} - data-l10n-attrs="aria-description" /> @@ -174,7 +173,6 @@ export function Colorways(props) { checked={colorwayId === id} className="sr-only input" onClick={handleColorwayClick} - data-l10n-attrs="aria-description" data-l10n-args={JSON.stringify({ colorwayName: label, })} diff --git a/browser/components/newtab/content-src/aboutwelcome/components/Themes.jsx b/browser/components/newtab/content-src/aboutwelcome/components/Themes.jsx index e7e516cc9224..091b02bf985e 100644 --- a/browser/components/newtab/content-src/aboutwelcome/components/Themes.jsx +++ b/browser/components/newtab/content-src/aboutwelcome/components/Themes.jsx @@ -30,7 +30,6 @@ export const Themes = props => { checked={theme === props.activeTheme} className="sr-only input" onClick={props.handleAction} - data-l10n-attrs="aria-description" />