A Helpful Diagram
Blogging through Venn diagrams.
Blogging through Venn diagrams.
Working.
I hadn’t heard of the save-data header. This article shows how you can use a Service Worker to sniff for it and serve up smaller assets, but I’m guessing you could also sniff for it from the server.
Paul is digging deep into flexbox and finding it particularly useful for internationalisation …but there are still some gotchas.
This looks a good (free!) event in London all about the latest browser goodies, all wrapped in the “progressive apps” buzzword.
Alas, I’ll be making my way back from Indie Web Camp Düsseldorf the day this is on.
Una’s [Instagram filters in CSS}(https://github.com/una/CSSgram) are great, but the browser support for CSS filters isn’t as good as, say, the browser support for canvas. Here’s a clever bit of scripting to polyfill filters using canvas.
Here’s a bit of convergent evolution: Hugo’s script is similar to what I wrote about recently.
He also raises a point that Kevin mentioned:
I would like to investigate on the
detailsandsummaryelements as they are basically a native implementation for content toggles.
For some reason details never got much browser love, even though it’s clearly paving a well-trodden cowpath.
It’s such a nice day, we’re eating al fresco.
The thesis: any film is improved by playing Walk Of Life by Dire Straits over the ending.
The proof: this website.
(this is absorbing and brilliant)
Steak, salad, and potatoes.
Over on The Session I have a few instances of a progressive disclosure pattern. It’s just your basic show/hide toggle: click on a button; see some more content. For example, there’s a “download” button for every tune that displays options to download the tune in different formats (ABC and midi).
To begin with, I was using the :checked pseudo-class pattern that Charlotte has documented so well. I really like that pattern. It feels nice and straightforward. But then I got some feedback from someone using the site:
the link for midi files is no longer coming up on the tune pages. I am blind so I rely on the midi’s when finding tunes for my students.
I wrote back saying the link to download midi files was revealed by the “download” option. The response:
Excellent. I have it now, I was just looking for the midi button which wasn’t there. the actual download button doesn’t read as a button under each version of the tune but now I know it’s there I know what I am doing. I am using the JAWS screen reader.
This was just one person …one person who took the time to write to me. What about other screen reader users?
I dabbled around with adding role="button" to the checkbox or the label, but that felt really icky (contradicting the inherent role of those elements) and it didn’t seem to make much difference anyway.
I decided to refactor the progressive disclosure to use JavaScript instead just CSS. I wanted to make sure that accessibility was built into the functionality, rather than just bolted on. That’s why code I’ve written doesn’t rely on the buttons having a particular class value; instead the buttons must have an aria-controls attribute that associates the button with the element it toggles (in much the same way that a for attribute associates a label with a form field).
Here’s the logic:
aria-controls attribute (these should be buttons).aria-controls attribute (an ID).aria-hidden="true" and make that element focusable by adding tabindex="-1".aria-expanded="false" on the associated button (this attribute can be a bit confusing—it doesn’t mean that this element is not expanded; it means the element it controls is not expanded).aria-hidden and aria-expanded when there’s a click event.aria-hidden is set to false on an element (thereby revealing it), focus that element.You can see it action on CodePen.
I’m still playing around with this. I think the :focus styles are probably far too subtle right now—see this excellent presentation from Laura Palmaro for more on that. I’m also not sure if the revealed content should automatically take focus. I’ll see if I can get some feedback from people on The Session using screen readers—there’s quite a few of them.
Feel free to use my code but you might want to check out Jason’s code to do the same thing—his is bound to be nicer to work with.
Update: In response to this discussion, I’ve decided not to automatically focus the expanded content.
Today’s @yardybn1 offerings from @theguerillagril are very tasty indeed.
Seared venison loin on wild mushroom.
Enduring CSS (not int the sense of “put up with” but in the sense of “long-lasting”) is a new book by Ben Frain all about writing and maintaining modular reusable CSS.
You can read the whole thing for free online or buy an eBook.
Jon outlines his technique for keeping “the 30,000 foot” view when patterns are coalescing during a project.
See also: Andy P.’s experience of working with Jon this way.
A lovely little Homebrew Website Club in Brighton this evening.
An a revelation that comes as a shock to absolutely no one, the JavaScript injected by ad networks can be used as a vector for attack.
This industry-wide problem serves as a great example of how 3rd-party components can compromise the security of an otherwise secure site.
One more reason to install an ad blocker.
A lovely outlook on designing with progressive enhancement:
There will always be users coming from places you didn’t expect, using devices you didn’t test for.
Come for the videos of EnhanceConf. Stay for the skateboarding beagle.
I’m am soooo there!
Iceland, July 22nd: a conference about the material of the web …right up my alley.
You can get a ticket by backing the project on Kickstarter. Be sure to check out all the options.
See you in Reykjavík!