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

推荐订阅源

U
Unit 42
C
Cybersecurity and Infrastructure Security Agency CISA
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
S
Securelist
I
Intezer
AWS News Blog
AWS News Blog
L
LINUX DO - 热门话题
P
Privacy International News Feed
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
The GitHub Blog
The GitHub Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
爱范儿
爱范儿
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
S
Secure Thoughts
K
Kaspersky official blog
N
News | PayPal Newsroom
O
OpenAI News
Last Week in AI
Last Week in AI
C
Check Point Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tor Project blog
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
D
Docker
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
博客园 - 司徒正美
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
P
Palo Alto Networks Blog

Adactio: Links

HTMX and Web Components Instead of React Your ‘App’ Could Have Been a Webpage (so I fixed it for you…) The Descent — What Happened to the Frontend While You Weren't Watching Abject Praise - Infrequently Noted Talk: Let Jeffrey Zeldman Presents - Memories Can’t Wait—or, How I Learned to Keep Worrying About the Web - State of the Web The AI Resist List Notes & Narratives Show your hands honor for the strange power they bring you The golden rule of Customizable Select Storied Colors How building an HTML-first site doubled our users overnight The Field Guide to CSS Grid Lanes Happy Monday everyone, and let's talk about gender and ethnicity ratios at tech events. AI and the Rise of Mediocrity The value is in the difficulty - Annotated Tito as Gaeilge Three things about data Native Apps Should Be Avoided Whenever Possible — No One's Happy WebKit Features for Safari 26.5 I knew my writing students were using AI. Their confessions led to a powerful teaching moment | Micah Nathan Better Browser Caching with No-Vary-Search Google’s Prompt API The Boring Internet Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions Netizen | Derek Sivers Anti-work Let’s Use the Nonexistent ::nth-letter Selector Now | CSS-Tricks Two Paradigms for Enhancing HTML Tags It's Not AI. It's FOMOnetization. The end of responsive images Alistair Davidson / validation-enhancer · GitLab Never Lose Form Progress Again :: Aaron Gustafson Expansion artifacts No-stack web development Design and Engineering, As One · Matthias Ott Conference organising in 2026 AI Might Be Our Best Shot At Taking Back The Open Web | Techdirt The AI Great Leap Forward they told me the internet was forever Web Day Out - 12 March 2026 Bruce Lawson's personal site Progressive Web Components What we think is a decline in literacy is a design problem | Aeon Essays The End : Focal Curve Flood fill vs. the magic circle Web of State of the Browser Day Out SXSW 02006 Working with agents doesn't feel like flow — Bill de hÓra
HTML Video Poster Image: Enable Responsive Images and ALT Text for Poster
scottjehl · 2024-05-30 · via Adactio: Links

What is the issue with the HTML Standard?

UPDATED: April 23, 2026

The video element currently offers a single poster attribute, which allows us to load one poster image source. This is limiting when attempting to deliver an appropriate poster image size depending on browsing conditions and art-directed video sources. Additionally, the poster frame itself does not offer a means of describing/exposing the poster image itself in the accessibility tree.

Primary proposed solutions in exploration

In the discussion thread below, two approaches are being explored as potential ways to bring responsive image selection to poster, and make poster accessible:

Approach 1.

Allowing an img element (and optional picture element parent) to be valid child elements of the video element, with the child img's currentSrc property acting as a controller for the value of the video poster (overriding the poster attribute when present). A new posterfromimg attribute would enable this relationship, and serve a dual purpose of preventing pre-existing arbitrary fallback img content from controlling a poster, and notifying browsers to not immediately fetch the poster attribute and look within instead. The full plan for this proposal is bulleted out here, and the original idea for this was here.

<!--basic, common usage for resolution-based switching -->
<video src="video.webm" poster=”video.webp” posterfromimg>
   <img srcset="video-small.webp 500w, video.webp 1000w" sizes="(max-width: 500px) 100vw, 100vw" alt="a description of the poster image here">
</video>

<!--art-directed usage-->
<video src="square-crop.webm" poster=”square-crop.webp” posterfromimg>
       <source media="(min-width: 60em)" src="wide-crop.webm">
       <picture>
         <source srcset="wide-crop.webp" media="(min-width: 60em)">
         <img src="square-crop.webp" alt="a description of the poster image here">
    </picture>
</video>

The pattern uses for resource selection, fetching, and defining alternative text, honoring its own src/srcset/sizes/alt/crossorigin/referrerpolicy/fetchpriority/decoding/loading attributes where relevant. The width and height attributes will be ignored, instead using the <video> element’s layout box. The alt text for the poster should be described through the UA's video player interface, and only while the poster is displayed (not while the video is playing).

Approach 2.

Extend the video and its source element childnodes with new attributes: postersrcset, postersizes, and posteralt, which could be set initially on the video element to provide srcset-style image resolution switching, and on child source elements to override the parent video element's attributes when a source matches. Whether there's good reason to have posteralt on video and source elements or just the video element is debatable.

<!--basic, common usage for resolution-based switching -->
<video src="video.webm" poster=”video.webp” postersrcset="video-small.webp 500w, video.webp 1000w" postersizes="(max-width: 500px) 100vw, 100vw" posteralt="a description of the poster image here">
</video>

<!--art-directed usage-->
<video src="square-crop.webm" poster=”square-crop.webp” posteralt="a description of the poster image here">
       <source media="(min-width: 60em)" src="wide-crop.webm" postersrcset="wide-crop.webp">
</video>

Pros & Cons

Both options appear roughly comparable in their ability to address the core needs of the issue.

The benefits of approach 1 are that it leans on existing HTML elements and uses composability, and brings some unique control to poster such as the ability to use fetchpriority for posters on LCP elements, and crossorigin and image decoding features that poster cannot currently use. It'll also benefit from any future improvements to the img and picture element.

Approach 2 on the other hand, brings benefits of being less verbose for art-directed use cases: existing video source elements can gain postersrcset attributes to override the poster image and share the existing <source> elements' media attributes. On the other hand, this approach some surface area to two HTML elements' IDL with the addition of 3 new-to-HTML attributes each. Browser implementations for postersrcset, postersizes, and posteralt would need to freshly introduce these concepts to elements, likely by reusing srcset and accessibility helpers from other elements that use these patterns already.

Comparison Table

Topic A — <img> / <picture> in <video> B — postersrcset / postersizes / posteralt
Mechanism
  • Image Selection: chosen URL comes from a child <img> (& optional <picture>)
  • A11y: alt on that <img>.
  • Image Selection: postersrcset / postersizes (+ poster) on <video> and on <source>.
  • A11y: new posteralt attr
Strengths
  • Reuse of img / picture docs and behaviors.
  • Poster gains existing and future img element features: fetchpriority, crossorigin, decoding.
  • In art-directed @media use cases, posters can be defined using the same <source> rows as the video, sharing media.
Costs
  • New content-model rules (img/picture become valid in video).
  • Paired/redundant media attrs (video <source> vs picture) when both branch heavily.
  • Strict capabilities. Further control would call for more img-like attributes.
  • New spec and browser APIs and attribute surface area.
  • New vocab for authors to learn
Markup — one video, srcset/sizes only ~same. poster attr + one <img srcset sizes alt> ~same. poster attr + postersrcset / postersizes / posteralt on <video>
Markup — <source media> + art-directed posters Often heavier: parallel picture / image <source> ladder beside video sources. Often lighter: postersrcset (etc.) per video <source>, same media.

This comment attempts to summarize the pros and cons in more depth.

Thanks!