Skip to content

Commit

Permalink
Merge pull request #675 from Financial-Times/CI-1367-dac-label-in-nam…
Browse files Browse the repository at this point in the history
…e-10

fix aria-label from inputs
  • Loading branch information
juanSanchezAlcala committed Oct 27, 2022
2 parents 00cee85 + 116e030 commit fb6796d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/x-gift-article/src/ReferAFriend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
</span>
<div className="x-gift-article__buttons">
Expand Down
4 changes: 2 additions & 2 deletions components/x-gift-article/src/Url.jsx
Original file line number Diff line number Diff line change
@@ -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 (
<span className="o-forms-input o-forms-input--text">
<input
Expand All @@ -11,7 +11,7 @@ export default ({ shareType, isGiftUrlCreated, url, urlType }) => {
className="x-gift-article__url-input"
disabled={(shareType === ShareType.gift || shareType === ShareType.enterprise) && !isGiftUrlCreated}
readOnly
aria-label="Gift article shareable link"
aria-label={ariaLabel}
/>
</span>
)
Expand Down
6 changes: 4 additions & 2 deletions components/x-gift-article/src/UrlSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default ({
enterpriseLimit,
enterpriseHasCredits,
enterpriseRequestAccess,
enterpriseFirstTimeUser
enterpriseFirstTimeUser,
title
}) => {
const hideUrlShareElements =
(giftCredits === 0 && shareType === ShareType.gift) ||
Expand All @@ -42,7 +43,8 @@ export default ({
shareType,
isGiftUrlCreated,
url,
urlType
urlType,
ariaLabel: title
}}
/>
)}
Expand Down

0 comments on commit fb6796d

Please sign in to comment.