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
Social Icons: Add the ability to show/hide labels #38152
Social Icons: Add the ability to show/hide labels #38152
Conversation
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.
Thanks for working on this, Nick.
I just did a quick code review but will do more detailed testing on Monday.
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
|
Thanks for the review @Mamaduka I have made those changes and added comments. 🙌 |
|
Oh I like this. |
|
Nice one! |
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.
It looks like we'll have to label for links when showLabels is enabled.
Instead of adding another conditional for displaying aria-label, maybe we could use a different method?
I think Technique #1 from this post should fit our requirements - https://www.sarasoueidan.com/blog/accessible-icon-buttons/.
What do you think?
Good point, I will remove that.
Hmm this is interesting. So we make the label always present, but hide it visually if |
|
Correct, we can conditionally add cc @aristath |
|
I have made the requested changes. I also ran across a possible other a11y improvement, but have not made it yet. I don't think that the svg icons should have |
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.
This looks great. Thanks, @ndiego.
Do you mind creating a separate issue for role="img"?
☝️ @Mamaduka will do. I will also see if there are any other instance of This PR good to merge? |
|
My understanding is that we only need
Good to go! 🚢 |
Description
The Social Links (Icons) block allows you add custom link labels. Unfortunately you are not able to display these text labels, which has been requested in #31605. This PR fixes #31605 by adding the ability to toggle on and off link labels. When enabled, service name is shown if no custom label has been specified.
How has this been tested?
Screenshots
Types of changes
New feature
Checklist:
*.native.jsfiles for terms that need renaming or removal).