- “Good news about display: contents and Chrome” — Rachel Andrew notes that the accessibility danger of using
display: contents;
is fixed in Chrome. The problem was that, say you had a parent div that is laid out as a grid and inside you have a<ul>
with<li>
elements, and you wanted the<li>
elements to participate on that same parent grid. We have subgrid, but it’s not really the same thing. What you want is just to pretend like the<ul>
isn’t there at all and that the<li>
elements can hang out on the grid like anything else. The problem was that if you did that, you wiped out the accessible semantics of the list. But no more! - “Grid, content re-ordering, and accessibility” — Speaking of grids and accessibility, here’s Rachel again teaching us (through this slide deck) how it’s all-too-easy to really diverge the source order and display order of content with modern layout techniques. At the moment, the solution is essentially not to do that, but the future might hold a way for browsers to update tab order to be visually sensible when you do dramatically alter the layout.
- “The most useful accessibility testing tools and techniques” — Atrem Sapegin lists out some good ones, like eslint-plugin-jsx-a11y, storybook-addon-a11y, cypress-axe, Contrast app, Spectrum browser extension, and… using your tab key (lolz).
- ButtonBuddy — Tool from Stephanie Eckles that helps generate CSS for buttons. But the real point of it is to give you colors as custom properties that satisfy color contrast guidelines.
- “Are your Anchor Links Accessible?” — Amber Wilson goes through five iterations of an anchor link in/by a header before landing on a good one and, even then, there are questions to tackle.
- “Don’t put pointer-events: none on form labels” — I’m a little shocked that anyone would do this at all, but it turns out it comes from Material Design’s “floating label” pattern. I think that pattern is so silly. It doesn’t actually save any space because you need the space where you float the label to anyway. Gosh.
- “Accessible Text Labels For All” — Sara Soueidan tests real accessibility software and how it presents common interactive elements. For example, a “read more” link isn’t very useful (read more what?), and “add to cart” isn’t very useful alone (add what to cart?). You can add, for example, product names to those “add to cart” buttons, but don’t do it in the middle of the button as that can break things. Add the extra text at the end.
The post Some Articles About Accessibility I’ve Saved Recently appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.