Skip to content
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

Open
CoreyGinnivan opened this issue Nov 14, 2019 · 6 comments
Open

Have small font size better affect low vision types #11

CoreyGinnivan opened this issue Nov 14, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@CoreyGinnivan
Copy link
Owner

No description provided.

@CoreyGinnivan CoreyGinnivan added the enhancement New feature or request label Nov 14, 2019
@CoreyGinnivan CoreyGinnivan self-assigned this Nov 14, 2019
@samC3
Copy link

samC3 commented Nov 19, 2019

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?

@CoreyGinnivan
Copy link
Owner Author

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.

@samC3
Copy link

samC3 commented Dec 2, 2019

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?

@megaroeny
Copy link

megaroeny commented Nov 3, 2022

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

@cstrobbe
Copy link

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.)

@megaroeny
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants