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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -138789,10 +138789,10 @@ details[open] > summary:first-of-type {
the <span data-x="attr-input-type-file">File Upload</span> state, when it generates a <span>CSS
box</span>, is expected to render as an <span>'inline-block'</span> box containing a span of text
giving the filename(s) of the <span data-x="concept-input-type-file-selected">selected
files</span>, if any, followed by a button 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
files</span>, if any, followed by a <code>button</code> 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.

<span>implementation-defined</span> (and possibly locale-specific) text, for example "Choose
file".</p>

Expand Down