commit a24346b329467c24fa5dd1e5bae0253adb8cf3f6
parent 6f26cb7657909c67ce646cb37cef797fa99ba45a
Author: Giulia Cardieri <gcardieri@mozilla.com>
Date: Mon, 17 Nov 2025 22:26:41 +0000
Bug 1981897 - Remove role link from span for cta paragraph. r=emcminn,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D272926
Diffstat:
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/browser/components/aboutwelcome/content-src/components/CTAParagraph.jsx b/browser/components/aboutwelcome/content-src/components/CTAParagraph.jsx
@@ -37,12 +37,15 @@ export const CTAParagraph = props => {
["Enter", " "].includes(event.key) ? onClick(event) : null
}
value="cta_paragraph"
- role="link"
>
{" "}
{/* <a> is valid here because of click and keyup handling. */}
{/* <button> cannot be used due to fluent integration. <a> content is provided by fluent */}
- <a data-l10n-name={content.text.string_name} tabIndex="0"></a>
+ <a
+ data-l10n-name={content.text.string_name}
+ tabIndex="0"
+ role="link"
+ ></a>
</span>
) : null}
</Localized>
diff --git a/browser/components/aboutwelcome/content/aboutwelcome.bundle.js b/browser/components/aboutwelcome/content/aboutwelcome.bundle.js
@@ -1930,11 +1930,11 @@ const CTAParagraph = props => {
"data-l10n-id": content.text.string_id,
onClick: onClick,
onKeyUp: event => ["Enter", " "].includes(event.key) ? onClick(event) : null,
- value: "cta_paragraph",
- role: "link"
+ value: "cta_paragraph"
}, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
"data-l10n-name": content.text.string_name,
- tabIndex: "0"
+ tabIndex: "0",
+ role: "link"
})) : null));
};