惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News | PayPal Newsroom
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
S
Security @ Cisco Blogs
宝玉的分享
宝玉的分享
Hacker News: Ask HN
Hacker News: Ask HN
T
Troy Hunt's Blog
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Latest news
Latest news
NISL@THU
NISL@THU
S
Security Affairs
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
AI
AI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
小众软件
小众软件
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
AWS News Blog
AWS News Blog
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
I
InfoQ
Schneier on Security
Schneier on Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
The Exploit Database - CXSecurity.com
IT之家
IT之家
T
Threatpost
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
News and Events Feed by Topic
L
LINUX DO - 最新话题
F
Full Disclosure
大猫的无限游戏
大猫的无限游戏
H
Heimdal Security Blog
S
SegmentFault 最新的问题

Ben Myers

Tag, You’re It: Blog Questions 2025 Don’t Use aria-label on Static Text Elements Subtitles, Closed Captions, and Open Captions: What’s the Difference? Lost in Translation: Tips for Multilingual Web Accessibility Build a Blogroll with Eleventy I’m a Spotless Giraffe. How I Write Alt Text for Code Snippets on Social Media The Curious Case of “iff” and Overriding Screenreader Pronunciations The Web Needs a Native .visually-hidden Create Shareable Automatic Captions for Live Online Events with Web Captioner A First Look at the Websites and Software Applications Accessibility Act Bill Style with Stateful, Semantic Selectors How I Doubled My Lighthouse Performance Score in One Night How to Fix Your Low-Contrast Text Build a Twitch Chatbot for Sharing Your Content Using Algolia Search Ben’s Humane Guide to Technical Blogging On the ‹dl› Takeaways From “Adapting Comics for Blind and Low Vision Readers: A Roundtable Discussion” Takeaways From Axe-Con 2021 I Finally Understand Eleventy’s Data Cascade. Implement a Skip Link for Navigation-Heavy Sites aria-label, aria-labelledby, and aria-describedby: What’s the Difference? Out With The Old, In With The New Maintaining Focus Outlines for Windows High Contrast Mode Lexical and Dynamic Scope CSS Can Influence Screenreaders New Year, New Terminal: Alias Your Directories the Unix Way New Year, New Terminal: Alias Your Directories the Windows Way What Is ARIA? The Accessibility Tree How (Not) to Build a Button How Domino’s Could Topple the Accessible Web – Part 1: Public Accommodations
RSS Readers: Yet Another Case for Semantic Markup
Ben Myers · 2021-02-14 · via Ben Myers

The other day, after I published my article about skip links, I remembered I needed to validate my RSS feed. I had received some feedback several months ago that my migration might have broken the feed for some people, and I wanted to test that the feed was still active. As I checked out the article, I found something of a delightful surprise: one particular line of my article was highlighted green.

The Feedly RSS reader, previewing the beginning of the "Implement a Skip Link for Navigation-Heavy Sites" blogpost. The TL;DR section has a codeblock with a snippet of HTML code. The line that contains the skip link is highlighted in faint green.

For context: I use eleventy-plugin-syntaxhighlight to format my codeblocks. This plugin (like many syntax highlighting plugins!) lets you specify certain lines of code to highlight, so as to draw readers’ attention to those lines. It does this using the <mark> tag — you can see the issue where <mark> was proposed over <div> or <span>.

The plugin’s choice to use <mark> under the hood to highlight important lines of code gave my RSS reader, Feedly, the chance to style those lines, too — something it wouldn’t have had the chance to do had the codeblocks used a CSS-only solution. This means that people who read the article on a completely different platform than my site, without any of my site’s styles, get to benefit from the highlights in the same way.

I think that’s really cool.

I think in web development, we tend to assume that if our page ever shows without styles, it’s a symptom of a problem. Perhaps our stylesheets didn’t load, and the user needs to refresh the page to fix it. With RSS readers, however, the lack of our styles is a feature. It’s the reader working as intended.

RSS readers aren’t the only technology where blowing away our styles means the technology is working as intended. We may have people who read our page with their browser’s Reader Mode, which similarly blows away our styles to provide a lightweight, distraction-free reading experience.

Maybe our site is less a document and more of a web app, and our users won’t be using RSS readers or Reader Mode to use the site. Even still, users may view our site without our styles, thanks to high contrast mode or user stylesheets, which can also blow away any and all of our page’s styles.

I didn’t set out to make sure my RSS reader would show highlighted lines of code, and I doubt eleventy-plugin-syntaxhighlight was specifically built with RSS users in mind, either. This pleasant surprise in my RSS reader serves as a reminder that people will come to our page or our content in a variety of ways, many of which we’ll be unable to anticipate. Leaning on semantic markup means all of these users get the best possible chance to make sense of our site.