twitter / twitter-text

Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.
https://developer.twitter.com/en/docs/counting-characters
Apache License 2.0
3.07k stars 520 forks source link

Autolink: Link to tweet URL has no context for screen readers #341

Open jamesmacwhite opened 3 years ago

jamesmacwhite commented 3 years ago

Is your feature request related to a problem? Please describe.

Autolinked URLs that lead to the full tweet on the originating Twitter profile lack meaningful context for screen readers to easily determine what the link is, given the link value itself is a https://t.co path.

Example:

This an example tweet with some context that will be then truncated… 
<a class="url" href="https://t.co/xxxxxxxxxx" rel="external nofollow" target="_blank">https://t.co/xxxxxxxxxx</a>

Describe the solution you'd like

The addition of aria-label to better describe the URL and it's purpose when it appears in autolinked tweet data, thus for screen readers clearly indicating what its purpose is.