4 ms·
For contrast, maybe check out either HTML_CodeSniffer [0] or Vision Australia's Colour Contrast Analyser [1]. Also this Bootstrap issue [2], which references a
by danielnixon 12y ago
For contrast, maybe check out either HTML_CodeSniffer [0] or Vision Australia's Colour Contrast Analyser [1]. Also this Bootstrap issue [2], which references a couple more.
The problem with being pure CSS is that you're hiding inputs and styling their labels to appear (visually) as their replacements (against the labels' semantics).
If you're going to hide the inputs (in the three cases of labels with class "button", "radio" and "checkbox") and style labels against their semantics, you need to use JavaScript to fix the accessibility issues this introduces. I don't think there's a non-JavaScript, non-ARIA solution to the accessibility issues (other than not hiding the inputs in the first place).
So I think there are three options:
1. Hide inputs, style labels (status quo) and use JavaScript, ARIA, tabindex, etc to fix accessibility issues.
2. Don't hide inputs, remain pure CSS, avoid accessibility issues in the first place.
3. Ignore accessibility issues.
[0] https://squizlabs.github.io/HTML_CodeSniffer/ https://squizlabs.github.io/HTML_CodeSniffer/
[1] http://www.visionaustralia.org/digital-access-cca http://www.visionaustralia.org/digital-access-cca
[2] https://github.com/twbs/bootstrap/issues/3572 https://github.com/twbs/bootstrap/issues/3572