That's so cool! I remember doing some research a couple of years ago as something to potentially add to Dev 😊
It may be worth checking the contrast and if it fails the aria spec setting the text to solid white or black, which would be calculated at the time.
w3.org/TR/WCAG20/#visual-audio-con... w3.org/TR/2008/REC-WCAG20-20081211...
I've thrown together a quick proof of concept, it's written in JS but I imagine you'd rather the backend handled it.
jsfiddle.net/link2twenty/jL52defu/
This is awesome, thanks for the comment! This shows how important is to learn about contrast ratios and use it for creating an accessible experience.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's so cool! I remember doing some research a couple of years ago as something to potentially add to Dev 😊
Comment for #735
It may be worth checking the contrast and if it fails the aria spec setting the text to solid white or black, which would be calculated at the time.
w3.org/TR/WCAG20/#visual-audio-con... w3.org/TR/2008/REC-WCAG20-20081211...
I've thrown together a quick proof of concept, it's written in JS but I imagine you'd rather the backend handled it.
jsfiddle.net/link2twenty/jL52defu/
This is awesome, thanks for the comment! This shows how important is to learn about contrast ratios and use it for creating an accessible experience.