rems and ems, and why you probably don’t need them
David Gilbertson
83835

Couple of things I’d like to pick up on…

:| “My point: you don’t need in depth knowledge and fancy tools for accessibility testing — just imagine that you are someone with bad eyesight.”

Just wanted to make sure that your readers are aware that accessibility testing should go well beyond just ensuring those who are blind or have diminished sight are able to read interfaces. Even if accessibility was limited to testing for vision impairment, it’s a hugely diverse group of people with a huge range of strategies and software for using interfaces. Just closing your eyes and going “so this is what it’s like to be blind” is… not much cop.

It’s good to do your own testing, but there are standards, guidelines, and related tools based on extensive research for a reason: you sitting for half an hour fudging at an interface with the Tab key and Voiceover running isn’t going to tell you much by itself.

:| “Anyhoo, all that aside, the rem example is clearly the best here.”

I agree.

:| “That’s the ‘better for accessibility’ argument blown out of the water, now moving along to …”

But you just said—never mind.

:| “It explains (accurately) that by using a combination of rems and ems, you can create a component (say, a modal window) that can scale to different sizes just by changing a single font-size on the root element of the component.”

Yeah, and if you combine em units with viewport units, you can create a minimum font size, like :root { font-size: calc(1em + 1vw) }`.

:| “It makes sense. In the same way that “if you often murder people, it is handy to carry a shovel in the boot of your car” makes sense.”

So, what you’re saying is an elegant solution to a common responsive design challenge (things should appear proportionately smaller in smaller viewports) *is like murdering people*. May I be the first to say that this comparison is somewhat tenuous?

Like what you read? Give Heydon a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.