DEV Community

Discussion on: πŸ‘‰ 5 CSS useful properties I TOTALLY ignored. πŸ€“

Collapse
 
ericwbailey profile image
Eric Bailey

In addition to the accessibility concerns raised by Travis about hiding scrollbars, I'd also like to mention that it's probably best not to adjust selected text color. If a user has changed theirs from the operating system default, you're overriding their expressed preference, which isn't great.

If you do adjust the highlight color, make sure it passes Web Content Accessibility Guideline criteria for proper color contrast ratio, as too contrast may make the selection "invisible" to someone with low vision.

It's cool that CSS lets us manipulate this sort of stuff, but it's important to do so responsibly!

Collapse
 
helleworld_ profile image
DesirΓ© πŸ‘©β€πŸŽ“πŸ‘©β€πŸ«

It's great what you're pointing out, I'm always assuming that someone who changes the default colors of a browser is doing it based on accessibility and contrast-color.

Some comments have been hidden by the post's author - find out more