a11yTOConf2020

Writing Even More CSS With Accessibility In Mind

Speaker: Manuel Matuzović
Twitter: @mmatuzo
Slides: https://noti.st/matuzo/lWUq2w/writing-even-more-css-with-accessibility-in-mind

Progressive Enhancement

Respecting User Preferences

Improving a{}y with CSS

Testing a11y

<html class=”a11y-test-grayscale lang=”en”> … </html>

- Even better: html[lang*=" "] instead of html[lang=" "] to test for any number of spaces [https://codepen.io/matuzo/project/editor/ZyrVee](https://codepen.io/matuzo/project/editor/ZyrVee)

```css
html:not([lang]),
html[lang=" "],
html[lang=""],
html:not(:lang(en)) {
    border: 10px solid red;
}

HTML Semantics

Resources