From the course: EPUB Accessibility Using InDesign

Why style and content need to be separate - InDesign Tutorial

From the course: EPUB Accessibility Using InDesign

Start my 1-month free trial

Why style and content need to be separate

- [Instructor] This is a foundational category to ebook accessibility and often one of the hardest to grok and move past. Partly because of a long tradition of thinking exclusively about how things look on the page, and partly because of a lack of information. "Typographic conventions had to convey meaning in print "because that was all that was available. "They're still useful for sighted readers, "but are the wrong place now to be carrying meaning." This is a quote from Matt Garrish who wrote one of the foundational books in this field called Accessible EPUB 3. This is where your print prejudices are hard to overcome. If your content isn't machine readable, then it's not perceivable by all your readers. So presume your html gets separated from your carefully constructed CSS. In every ebook, it must be machine readable. So p class equals h one means nothing to reading systems. In this sample on the screen, the same CSS will display the same way as evidence from the snippet from the ebook, but are dramatically different from an accessibility point of view. So p class=h1 and Chapter Title is the text inside of that markup. And h1 class=Chapter Title, with the same text inside of that markup. And the very same CSS, it's identical, h1 ct, p.h1, exactly the same definitions. Both of those will look like this slide, they will both render exactly the same way, but are dramatically different under the hood. So p class=h1 means nothing to the machine, whereas an h1 tag will be machine readable. Meaning should only come from the markup, it shouldn't come from the styles. "Style's just a layer between your markup "and the device that renders it, "not an intrinsic quality you can rely on "to say anything about your content." Again, this is a quote from Matt Garrish. The meaning of the content should be the same both with and without any styles or formatting applied. In the example shown, p class=h1 holds no meaning. It is not machine readable. I will likely repeat this message a few times in this course, but it bears repeating. The integrity of your content depends entirely on using the right element for the job. So for example, a reader who can't see what your content looks like, needs to be able to interpret your content from how it's tagged. Using h1 tag in this context means that someone reading your content using a screen reader will have this heading level announced so that the content is understandable and navigable. It will position the reader in the content. Using a p tag means that your content will be slightly unrecognizable in the audio and will sound like a run-on sentence, like the text on this slide looks. Separating style from markup is consequentially not just about keeping CSS in a separate file from your markup, but recognizing that markup must convey meaning to be useful to all readers and that visual rendering is only one possible use case.

Contents