Hey everyone! I'm a 14-year-old developer excited to share my idea for a new accessibility feature for browsers. I want to create a system that allows users to set preferences for things like dyslexia support, color vision types (such as protanopia, deuteranopia, and tritanopia), and individual contrast levels through a new Accessibility tab. The idea is that these preferences would be passed on to websites via JavaScript, which means they could automatically adjust their designs by using something like `navigator.accessibilityPreferences`. I've detailed the full proposal on Mozilla Connect and would really appreciate any feedback or thoughts you have. I believe this could really enhance web inclusivity for everyone!
1 Answer
It would be awesome to have a CSS function that automatically picks colors with better contrast. If a user has a contrast option enabled, it could switch to a color that's closer to their preferences while still ensuring everything is readable. That way developers could easily adapt to varied needs without a hassle.

Yeah, I found that a few algorithms already exist for this! You just need to check the contrast ratios and see if they meet the standards. If something's too light, suggest darker colors, and if it's too dark, suggest lighter ones. I'll share a gist with this algorithm once I get a break from work!