Skip to content

Conversation

@frivoal
Copy link
Member

@frivoal frivoal commented Aug 12, 2025

No description provided.

@frivoal frivoal requested a review from LeaVerou August 12, 2025 23:10
@frivoal frivoal changed the title Expand on why the controlled value is desirable [image-animation-property] Expand on why the controlled value is desirable Aug 12, 2025

However, in the general case, authors have no way of knowing which images are static and which are animatable.
Without this knowledge, the choice is either to provide no controls at all,
or controls even on static images that don't need it.
Copy link
Member

Choose a reason for hiding this comment

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

IMO the solution to this is to expose that distinction. You're assuming that's not possible and building on it, but I don't think that's the case.

<dd>
There is precedent for CSS properties affecting the presence of UI controls on elements:
[`resise`](https://www.w3.org/TR/css-ui-3/#resize),
[`overflow: scroll` or `overflow: auto `](https://www.w3.org/TR/css-overflow-3/#overflow-control).
Copy link
Member

Choose a reason for hiding this comment

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

There is no precedent for CSS and HTML affecting UI in the same way though, I think. Right now we don't have <img controls>, but do we want to rule it out forever?

The example below shows what a typical browser-provided UI can be expected to look like,
and replicating that manually,
with good accessibility,
would not be easy.
Copy link
Member

@LeaVerou LeaVerou Aug 12, 2025

Choose a reason for hiding this comment

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

  1. But this is often needed for <video> as well, which this doesn't apply to
  2. Yes, we should make simple things easy, but after we've made complex things possible unless we have very high confidence that they cover the vast majority of use cases. Specifically when it comes to UI, features where UAs add UI that is not customizable are typically the source of user pain. We've seen this in both the features you listed above: we had to add a ton of stuff to make scrollbars customizable and CSS resizers are also rarely used for anything other than textareas. Instead people prefer customizable components for resizing e.g. panels or other containers.

users need to be able to chose to turn such animations off
while keeping the ability to opt into viewing them individually.
`image-animation: controlled` can be applied to existing markup and user-generated content
in a way that changing markup cannot.
Copy link
Member

Choose a reason for hiding this comment

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

This is a much more general issue though and applies to a lot more than this.

Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

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

I've replied to individual points, but as a general point, this mainly argues that controlled is desirable, not why it needs to be in the MVP.

Is the feature not useful without it?
IMO only if custom UIs cannot be built at all. That's only the case if we cannot distinguish static from animated images. So perhaps we can frame it as a tension between these two: either we need controlled, or we need a way to tell them apart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants