-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Have small font size better affect low vision types #11
Comments
Hey guys, love this project! It's exactly what we need at work right now. I found it wasn't very obvious how the font field affects the final score, is this issue to adjust how font size works in the algorithm that decides the final rating? I found the getWcagScore.js file which looks like it’s based on 1.4.6 of the WCAG spec? And I can see that the requirement to be over 15px in font size was dropped. Really happy to help out with this issue if I can, just wondering what the thinking is to build out the enhancement? |
I should have specified what this what relating to a bit more haha (still learning). This was to make the Low Vision, Cataracts and Glaucoma type be affected by smaller text (so it would fail under 12px or so). The big reason for scrapping the font-size requirement was that it felt super wrong to have something that was very high contrast immediately fail everything if it was under 15px. The WCAG spec is great most of the time, but some things just don't make too much sense. But, you're right – it's just bare bones and based on the WCAG spec for now. We should be showing off the maths behind it a bit better. Maybe we could have the vision type rows clickable, and expand to show all the different fields it's passing/failing so it's easy to understand what's wrong. |
Ah that makes more sense! I hadn't noticed that the WCAG spec didn't specify that. Definitely makes sense to drop the 15px requirement. What would the fields be that it could pass or fail on under each field? Potentially it could auto expand on each field if it fails to make it easy to quickly see what is going wrong? Although that could be too much information if it fails on too many fields. It would be interesting to try and convey the math going on, maybe pull out the calculation from the tooltip on the grading and put it under the overall score. To stop it from crowding the screen could make that an expandable field as well to show more details if you're interested? |
Actually I don't see font size taken into account at all? I tried using 1px font size and it still passes 🫣😅 Try this: https://www.whocanuse.com/?bg=663399&fg=ffffff&fs=1&fw=
|
As far as I know, WCAG doesn't specify a minimum font size for several reasons:
|
@cstrobbe ah yes good point! I learned about this recently, after trying to dig deeper into minimum font sizes (it is recommended to keep at least 12 from what I've read). Thanks for clarifying that! |
No description provided.
The text was updated successfully, but these errors were encountered: