-
Notifications
You must be signed in to change notification settings - Fork 154
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
Replace Shields.io with locally rendered data/badges #591
base: master
Are you sure you want to change the base?
Conversation
What you could is keep the shields.io badges and just use the API calls to Github, Gitlab etc to power the alt data. This will allow that visually, it will be still up-to-date. The screen readers will be out of sync but just making a note somewhere on the page should help inform the users. |
That's what I was originally intending to do - I feel like that approach could make things confusing when I come to add the sorting functionality, though (as that would have to be driven by the local data). I'll give it some thought. |
I tried the page with NVDA, and the aria-label approach didn't work (apparently it's not valid for 'li' tags). So instead, I just tweaked the markup to properly present the item's title first.
0e0b951
to
709bf3e
Compare
A lot of the cases where 'Other' was showing as the license turned out to be MIT/Apache projects with their files named wrong, which feels misleading.
Currently, data like download counts and licenses is displayed by embedding Shields.io badges as image tags. This PR (which is an extension of #589) replaces these entirely with data fetched directly from Crates.io/GitHub/GitLab.
There's two pretty big benefits to doing this:
However, there are also some tradeoffs:
source = "github"
anyway - the unauthenticated rate limit is very low!I personally think these trade-offs are worth it (assuming I can get around to implementing the sorting functionality later!), but I'd be interested to get some feedback from the community on whether they think this is the right direction.
Here's what the new UI looks like (see the live page for comparison):
(the top three items there use the
crates
source, the last one uses thegithub
source)