Skip to content

Add controls attribute to img#12151

Merged
annevk merged 5 commits intowhatwg:mainfrom
yoelhawa:img-controls
Apr 15, 2026
Merged

Add controls attribute to img#12151
annevk merged 5 commits intowhatwg:mainfrom
yoelhawa:img-controls

Conversation

@yoelhawa
Copy link
Copy Markdown
Contributor

@yoelhawa yoelhawa commented Feb 11, 2026

Add a new controls attribute to img that allows the user agent to add interactive user interface over the image.

Fixes #11856.

(See WHATWG Working Mode: Changes for more details.)


/acknowledgements.html ( diff )
/dom.html ( diff )
/embedded-content.html ( diff )
/indices.html ( diff )

Add a new `controls` attribute to `img` that allows the user agent to add
interactive user interface over the image.
Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice! You also need to update img in the element index.

Comment thread source
Comment thread source
@annevk annevk linked an issue Feb 11, 2026 that may be closed by this pull request
@annevk annevk added addition/proposal New features or enhancements topic: img labels Feb 11, 2026
@yoelhawa yoelhawa marked this pull request as ready for review February 12, 2026 22:44
Comment thread source Outdated
Comment thread source Outdated
@annevk
Copy link
Copy Markdown
Member

annevk commented Mar 26, 2026

@yoelhawa can you update this PR so there's an open issue with a pointer to #12318 as suggested by @zcorpan? You want to use class="XXX" and probably emulate one of the existing ones that points to a GitHub issue. The general gist of the wording should be that we don't want user agents to add animation controls before tackling that issue. Thanks!

@annevk annevk requested a review from zcorpan April 7, 2026 08:31
Comment thread source Outdated
@yoelhawa yoelhawa requested a review from zcorpan April 9, 2026 23:13
@zcorpan
Copy link
Copy Markdown
Member

zcorpan commented Apr 10, 2026

There was discussion in w3c/html-aam#601 about how this impacts the a11y exposure. It seems solvable to me, but should it block landing this? What's the a11y mapping in WebKit?

@yoelhawa
Copy link
Copy Markdown
Contributor Author

Left a comment there about WebKit's a11y implementation. I agree that this seems easily solvable.

@annevk annevk merged commit ad6c38c into whatwg:main Apr 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition/proposal New features or enhancements topic: img

Development

Successfully merging this pull request may close these issues.

controls attribute for <img> element

3 participants