Speaker: Manuel Matuzović
Twitter: @mmatuzo
Slides: https://noti.st/matuzo/lWUq2w/writing-even-more-css-with-accessibility-in-mind
div {
color: #FFF;
css-is: amazing;
background: #000;
}
font-size: 18px;
font-size: 1rem;
@media (prefers-reduced-motion: reduce)
@media (prefers-reduced-motion: no-preference)
can be used to target only browsers that support animation preference<a href="document.pdf" download>download file</a>
a[download]::after { background-image: url('icons/download.png')}
a11y-tests.css file https://github.com/matuzo/a11y-tests.css
a11y-tests-grayscale
```
.a11y-tests-grayscale {
filter: grayscale(100%) !important
}<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;
}
<button>
is much better button than a <div>
display: content
display: none
to hide checkboxes, (they will be removed from a11y tree)list-style-type: none
Voice over made a choice to remove the announcement of the element listdiv::before { content: url('icons/ping.png') / "You're here."; }