vercel / react-tweet

Embed tweets in your React application.
https://react-tweet.vercel.app
MIT License
1.61k stars 86 forks source link

Add accessible text to icon only link in `TweetInfo` #30

Closed tywayne closed 1 year ago

tywayne commented 1 year ago

This <a> contains only an <svg> and no accessible text, which makes it unusable to screen readers. This adds text via an aria-label attribute.

In lieu of the aria- attribute, I would normally resolve this kind of thing with an sr-only or visually-hidden type of utility class and related CSS to allow the content inside the <a> to exist, but I'm not seeing any existing pattern/class like that in this project, so the aria-label should suffice.