whocanuse icon indicating copy to clipboard operation
whocanuse copied to clipboard

Have small font size better affect low vision types

Open CoreyGinnivan opened this issue 4 years ago • 6 comments

CoreyGinnivan avatar Nov 14 '19 05:11 CoreyGinnivan

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?

samC3 avatar Nov 19 '19 21:11 samC3

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.

CoreyGinnivan avatar Nov 27 '19 03:11 CoreyGinnivan

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?

samC3 avatar Dec 02 '19 11:12 samC3

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=

  • The URL doesn't change the font size
  • Manually change the font size to 1px and you'll see it passes still

megaroeny avatar Nov 03 '22 02:11 megaroeny

As far as I know, WCAG doesn't specify a minimum font size for several reasons:

  • If the font size is so small that no one can read it (cf. 1px from @megaroeny's comment), it's not specifically an accessibility issue but a usability issue. The general goal of WCAG is not usability but anti-discrimination. (This is not to say that you can have good accessibility without usability, but that's a different discussion.)
  • Zooming has been a standard feature in browsers for a long time now.
  • Any minimum value would be arbitrary. (Unless there is research that says something like, "People with vision impairment X need at least font size Y". In reality however, people who use zooming use different zoom levels, e.g. a lower zoom level to get an overview of the page, then moving to a higher zoom level to read content; the high zoom level may vary during the day, e.g. due to eye fatigue.)

cstrobbe avatar Jun 17 '23 08:06 cstrobbe

@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!

megaroeny avatar Jun 17 '23 14:06 megaroeny