GithubHelp home page GithubHelp logo

coreyginnivan / whocanuse Goto Github PK

View Code? Open in Web Editor NEW
432.0 11.0 46.0 1.68 MB

WhoCanUse is a tool that brings attention and understanding to how color contrast can affect different people with visual impairments.

Home Page: https://whocanuse.com/

License: MIT License

JavaScript 87.67% CSS 12.33%
a11y accessibility-service accessibility color contrast-ratio

whocanuse's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whocanuse's Issues

Pass/Fail is misleading

You apply contrast calculations after applying the simulation and base pass/fail results on the adjusted colours. With this you make it seem like #663399 vs #FF99FF fails WCAG, but this is not the case.

Contrast calculation should be done on the original colours only. The 3:1, 4.5:1, and 7:1 contrast ratios already take into account if the end result would be sufficiently visible/readable to people with these visual impairments.

How does astigmatism figure into your ratings?

I agree with the posting at https://jessicaotis.com/academia/never-use-white-text-on-a-black-background-astygmatism-and-conference-slides/ It notes that light text on a dark background can be hard to read. The examples in her article match my experience: I do see ghost images of the glyphs that interfere with readability. So my question:

Does your rating system incorporate a factor for astigmatism? (I imagine that smaller fonts would suffer more...) Many thanks.

Can’t Copypaste Colors

I tried to copypaste a hex color without the # into the foreground and background color fields, but it won’t work.

My Environment
Safari 13.0.3
macOS 10.15.1

Input field text color frequently disobeys WhoCanUse's own color-contrast recommendations

WhoCanUse sets the text color of its input fields to white on dark backgrounds and black on light backgrounds:

Screenshot_2019-12-14_18-32-57

Hilariously, the function used for this frequently disagrees with WhoCanUse's own contrast recommendations. In the above example, it placed white text on the #169155, even though WhoCanUse assigns that color combination a FAIL rating for all but a tiny minority of color-blind users. It should have chosen a black text color --- that combination gets an AA rating.

Personally, I think that the white text is actually a little more readable against the green background than black text. But the whole point of this website is to teach people like me (and the misguided designers who create inaccessible products like this) that we can't rely on our eyes to tell us which color combinations have the best contrast. To maximize accessibility and inclusion, we must defer to the WCAG contrast function, so the input field should use the WCAG contrast function as well.

There a way for another tool to leverage your work?

I've got this project https://github.com/GoogleChromeLabs/ProjectVisBug and I'd love to enhance the accessibility hover tooltip with the information your site is currently displaying.

Screen Shot 2019-12-06 at 6 56 38 PM

Give it a try by visiting the tool sandbox http://visbug.web.app and picking the accessibility tool from the left toolbar and hovering on things with color you want to compare. Imagine it was that easy to see the information you've uncovered right there in the moment.

thoughts!?

Localization (Translation) into different languages

This is a question/request, not an issue.

Is it possible to localize/translate this tool into different languages? For me, I'd like to contribute to Japanese translation if possible. If yes, could you please give me the instructions? Thanks!

Add ability to check larger font sizes

I have run into an issue where a font is sized at 115px for a specific design, and as of right now the whocanuse only increases to 60px. I would love to be able to check for larger fonts.

Dynamically create color comparison image for social sharing

Right now, you get a generic OpenGraph preview image when you share a WhoCanUse link in a chat client or social network. Here's what I get when sharing a comparison between #0078c2 and #ffeb38 (https://www.whocanuse.com/?bg=0078c2&fg=ffeb38&fs=16&fw=):

The generic WhoCanUse image shown as an unfurl in Slack and Discord

It would be cool if the image preview for the URL's specific color combination was dynamically generated so that shared link unfurls showed the colors and contrast ratio information like 11ty's Rainglow demo does:

The image it generates for #048e86 (https://rainglow.zachleat.dev/048e86/):
A dynamic image that has a #048e86 background color along with contrast information for white and black

How it appears in social share previews:
The image shown as an unfurl in Slack and Discord

This is accomplished using 11ty's serverless plugin on Netlify alongside 11ty's OpenGraph image API. It seems like it might be possible to create a new layout to use with 11ty's API or a similar one, but I'm not familiar with Vercel and have no idea how feasible it is to do either/both of these on there?

Avoid back button trap by using `replaceState`

This tool is awesome! Nice work Corey!

I was testing it out and noticed that if you change your colors a number of times, then you have to use the back button an equal number of times to exit back out of the website.

I think it would be better if you only had to use the back button once to exit, regardless of how many changes you'd made.

I think this could be achieved by changing pushState to replaceState in updatePath. If I opened a PR for that would you be open to merging it in?

Thanks!

Can't reach the bottom of the left side color picker.

On a low res monitor

Width: 1360
Height: 768
Device Pixel Ratio: 1

Display Dimensions:(width x height) 14.2" x 8.0"
Screen Diagonal: 16.3" Screen

I am unable to get to the bottom of the left side color picker as the no scroll option.

image

On high res

Width: 3840
Height: 2400
Device Pixel Ratio: 2.5

Display Dimensions:(width x height) 16.0" x 10.0"
Screen Diagonal: 18.9" Screen

I can see this.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.