-
Notifications
You must be signed in to change notification settings - Fork 235
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
Consider adding aria-labelledby to .timePosted for accessibility #163
Comments
This is simply taking whatever Twitter passes back to us int he JSON object and outputs that. If you want to re-format you would need to write a custom function to call upon all date fields returned. |
Oh wait you are saying to add that class to our output? Eg https://github.com/jasonmayes/Twitter-Post-Fetcher/blob/master/js/twitterFetcher.js#L361 and the lines below that also inject that classname |
This is what we implemented: https://www.diffchecker.com/c6wmeUaz The tweet receives an Here's an HTML example: <ul>
<li>
<p class="tweet" id="tweet--1">Hey, this is my first tweet!</p>
<p class="timePosted">
<a href="#" aria-labelledby="tweet--1">Posted on Mar 8, 2018</a>
</p>
</li>
<li>
<p class="tweet" id="tweet--2">This is my second tweet.</p>
<p class="timePosted">
<a href="#" aria-labelledby="tweet--2">Posted on Mar 8, 2018</a>
</p>
</li>
</ul> |
Closing as this can be achieved using advanced example and constructing own html if needed. |
Steps to reproduce the issue
.timePosted
visible.Results
Twitter Post Fetcher will output links like "Posted on March 1, 2018" for each tweet posted on March 1st.
Request
WCAG 2.0 suggests links with the same link text to use either
aria-labelledby
oraria-label
. Would you consider addingaria-labelledby
to.timePosted
? Thearia-labelledby
can point to.tweet
.Here's the spec. The Siteimprove Chrome Extension is a great tool to help test accessibility issues like this. MDN Docs for
aria-labelledby
.The text was updated successfully, but these errors were encountered: