Skip to content

Update file upload control rendering to require a real button element #11257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Apr 24, 2025

Update file upload control rendering to require a real button element for ::file-selector-button

This ensures that it works work interopably as they're an element-backed pseudo-element.

Fixes #11130

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


/rendering.html ( diff )

@lukewarlow lukewarlow added the needs implementer interest Moving the issue forward requires implementers to express interest label Apr 24, 2025
files</span>, if any, followed by a <span>button</span> element that, when activated, provides the
user with a file picker from which the selection can be changed. The button is expected to use
<span>button layout</span> and match the <span>'::file-selector-button'</span> pseudo-element. The
contents of its <span>anonymous button content box</span> are expected to be
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we should still say "anonymous button content box" if we are explicitly saying that its a button element

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I'm not sure about the button layout bit either.

Copy link
Member

Choose a reason for hiding this comment

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

@zcorpan can probably help us out here.

Copy link
Member

Choose a reason for hiding this comment

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

https://html.spec.whatwg.org/#the-button-element-2 already requires button elements to have button layout, so no need to require it again here.

@josepharhar
Copy link
Contributor

I am supportive of this change

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

Successfully merging this pull request may close these issues.

File upload control rendering should specify the button element to use.
4 participants