From 116e030026a6a1ef7c08aae6b295d162b25241a5 Mon Sep 17 00:00:00 2001 From: Juan Sanchez Alcala <102036944+juanSanchezAlcala@users.noreply.github.com> Date: Wed, 26 Oct 2022 16:34:51 +0200 Subject: [PATCH] fix aria-label from inputs --- components/x-gift-article/src/ReferAFriend.jsx | 2 +- components/x-gift-article/src/Url.jsx | 4 ++-- components/x-gift-article/src/UrlSection.jsx | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/x-gift-article/src/ReferAFriend.jsx b/components/x-gift-article/src/ReferAFriend.jsx index 768665c85..bb8b0ddf3 100644 --- a/components/x-gift-article/src/ReferAFriend.jsx +++ b/components/x-gift-article/src/ReferAFriend.jsx @@ -18,7 +18,7 @@ export default ({ rafTitle, rafDescription, urls, actions }) => { value={urls.raf} className="x-gift-article__url-input" readOnly - aria-label="Gift free subscription shareable link" + aria-label={rafTitle} />
diff --git a/components/x-gift-article/src/Url.jsx b/components/x-gift-article/src/Url.jsx index 5281b079e..5fe90b395 100644 --- a/components/x-gift-article/src/Url.jsx +++ b/components/x-gift-article/src/Url.jsx @@ -1,7 +1,7 @@ import { h } from '@financial-times/x-engine' import { ShareType } from './lib/constants' -export default ({ shareType, isGiftUrlCreated, url, urlType }) => { +export default ({ shareType, isGiftUrlCreated, url, urlType, ariaLabel }) => { return ( { className="x-gift-article__url-input" disabled={(shareType === ShareType.gift || shareType === ShareType.enterprise) && !isGiftUrlCreated} readOnly - aria-label="Gift article shareable link" + aria-label={ariaLabel} /> ) diff --git a/components/x-gift-article/src/UrlSection.jsx b/components/x-gift-article/src/UrlSection.jsx index 57505005c..3b44828dc 100644 --- a/components/x-gift-article/src/UrlSection.jsx +++ b/components/x-gift-article/src/UrlSection.jsx @@ -23,7 +23,8 @@ export default ({ enterpriseLimit, enterpriseHasCredits, enterpriseRequestAccess, - enterpriseFirstTimeUser + enterpriseFirstTimeUser, + title }) => { const hideUrlShareElements = (giftCredits === 0 && shareType === ShareType.gift) || @@ -42,7 +43,8 @@ export default ({ shareType, isGiftUrlCreated, url, - urlType + urlType, + ariaLabel: title }} /> )}