Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix aria-label from inputs #675

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does rafTitle contain - any example text (i.e. what would be in props.raf?.title)?

Presumably it'll be "Share this article" instead of "Gift free subscription shareable link".

Going by this line the default would be 'Gift 2 months free access to the FT'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it would contain the title of the section and in this case is the default .
image

/>
</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 =