Thursday 22 February 2018

Variable Order

A fascinating little tech demo by Roman Komarov that allows for clickable table sorting entirely in CSS. It's a combination of inline CSS custom properties, the order property, and calc().

This demo sparked a ton of conversation about accessibility, the crux of which is that the reordering is done only visually and not in the source. Which means that someone interacting directly with the source (a screen reader) might be mislead into thinking they've sorted the table when they haven't. Rachel Andrew pointed out that it's actually one of the rare things the spec itself tells you not to do:

Authors must use order only for visual, not logical, reordering of content. Style sheets that use order to perform logical reordering are non-conforming.

As a connoisseur of fine CSS trickery, I applaud the idea. In production, still a job for JavaScript. And about that order property? Is it always a bad idea to use? Amelia Bellamy-Royds has a post with a pretty good use case.


Variable Order is a post from CSS-Tricks



from CSS-Tricks http://ift.tt/2EJpBGt
via IFTTT

No comments:

Post a Comment

Passkeys: What the Heck and Why?

These things called  passkeys  sure are making the rounds these days. They were a main attraction at  W3C TPAC 2022 , gained support in  Saf...