-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: ability to add titles for the links #549
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ export interface NavigationSocialItemOwnProps extends NavigationSocialItem { | |
className?: string; | ||
} | ||
|
||
const SocialIcon: React.FC<NavigationSocialItemOwnProps> = ({icon, url, className}) => { | ||
const SocialIcon: React.FC<NavigationSocialItemOwnProps> = ({icon, url, className, urlTitle}) => { | ||
const iconData = getMediaImage(icon); | ||
const {alt} = iconData; | ||
|
||
return ( | ||
<a | ||
href={url} | ||
aria-label={alt} | ||
title={alt} | ||
title={urlTitle || alt} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but the accessible name will be read by screenreader in this order:
Is icon's |
||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={b(null, className)} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there a fallback to the text in this place but not in all places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backward compatibility I left fallback here. But I didn't do one on other places to avoid unexpected tooltips. Moreover, I expect that the link text and link title will not be the same