Design for reading: tips for optimizing content for Reader modes and reading apps

Sara Soueidan · 2021年5月10日

AI 摘要 AI 生成,可能有误

The article argues that web content must remain understandable even when CSS is stripped away, as happens in Reader modes and reading apps, making progressive enhancement essential to resilient design. The author offers practical tips: provide markup-only alternatives for ideas that depend on CSS to be understood, keep real content in HTML rather than CSS pseudo-elements, and hide non-core content such as ads and author bios using the HTML hidden attribute so it doesn't clutter the reading experience. Ultimately, keeping content in the markup layer ensures a decent experience for users regardless of how they choose to consume it.

Our content will not always look the way we expect it or want it to. Many apps, tools, and environments that people use to browse the Web strip our content of our CSS and apply their own styles to it. And unless we always keep that in mind, we risk creating incomplete or even broken experiences for users of those technologies or tools.

You might be reading this very blog post in a reading app right now, or maybe even listening to it being read out loud to you. In either case, the visual style enhancements I have applied to the content don’t really matter much anymore. My CSS isn’t enhancing your experience. My content—the HTML markup—though, defines your experience and can either make it or break it.

Reader modes and Forced Color modes are two common environments where content is typically stripped of our CSS. So a question I think we should constantly be asking ourselves is: Is our content still understandable without CSS? Or are we relying too much on visual styles to put ideas across? Does the HTML layer alone provide a decent and sufficient experience to our users? Is our CSS truly the enhancement it is meant to be, or are we relying too much on our own preferences rather than our users’ to communicate our ideas?

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Sara Soueidan

The CSS caret-* properties and custom caret accessibility

AI 摘要This article examines the CSS caret-* properties (caret-color, caret-animation, and caret-shape) and the accessibility considerations surrounding the caret, an often-overlooked focus indicator for editable text and caret browsing mode. It explains how caret browsing enables precise keyboard navigation of web pages, and how operating systems like macOS and Windows provide accessibility settings for caret blinking, thickness, and visibility that browsers honor inconsistently. The author urges caution when applying custom caret styles, since the caret may be the only focus indicator some keyboard or pointer users receive.

My top picks for Interop 2027

AI 摘要The author shares their ranked picks for Interop 2027, a yearly project aiming to improve cross-browser interoperability of key web platform features, using Firefox's community ranking page. Their top choices—the HTML focusgroup attribute and the ariaNotify() API—reflect their preference for features that improve both accessibility/user experience and developer experience, followed by other picks like heading-related HTML attributes, Interest Invokers, and various CSS properties. The author notes that features cannot be downvoted, only ranked or left unranked, and concludes by linking to blog posts where other web developers shared their own rankings.

CSS to speech: alternative text for CSS-generated content

AI 摘要The article explains how CSS-generated content inserted via ::before and ::after pseudo-elements is included in an element's accessible name computation, and why meaningful CSS images, icons, and unicode characters need descriptive alternative text while decorative ones should be hidden from screen readers. It introduces the CSS Generated Content Module Level 3 syntax that lets authors provide alternative text after a slash in the content property (with empty-string alt text for decorative content), noting that browser support is now very good except for older browsers like Internet Explorer. The author shares testing results across browsers and screen readers such as VoiceOver, observing that CSS images without alt text are excluded from the accessibility tree, images with alt text are announced properly, and there are some quirks like NVDA not announcing Chrome's CSS image alt text and Safari only showing broken CSS image alt text when VoiceOver is enabled.

🎥 New (Video) Podcast: "Navigating the World of Web Accessibility with Sara Soueidan", with Kevin Powell

AI 摘要The author and Kevin Powell finally recorded a nearly two-hour video podcast about navigating the world of web accessibility, covering topics like HTML semantics, ARIA, screen readers, the accessibility tree, how CSS affects accessibility, and the author's Practical Accessibility course. They also chatted about shared personal interests such as cooking, fermentation, and nutrition. The author invites front-end designers and developers curious about accessibility to watch or listen and share their feedback.

CSS-only scrollspy effect using scroll-marker-group and :target-current

AI 摘要The article explains how to create a CSS-only scrollspy effect using the new scroll-target-group property combined with the :target-current pseudo-class, which automatically highlights navigation links (like a table of contents) when their target sections are scrolled into view—no JavaScript required. It describes how applying scroll-target-group to a container of HTML anchors promotes them to scroll markers, letting the browser determine and style the active link. The author also covers accessibility considerations, including WCAG contrast requirements for active link styling and using aria-current to convey the active state to screen reader users.