-
Notifications
You must be signed in to change notification settings - Fork 2.9k
File upload control rendering should specify the button element to use. #11130
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
Comments
I guess given appearance: auto is already a mess maybe this is fine? But it feels unfortunate, especially once we get appearance: base where I feel we'd want to specify one way or the other anyway. |
This is a pre-existing pseudo element rather than a new one so I don't think no longer matching it is an option. Especially when there's an even older |
I'm happy with using |
It looks like @emilio was the one who wrote that it is a It also looks like it was defined in html to be a thing with "button layout", but not specifically a I agree with luke that if we stop matching ::file-selector-button/::-webkit-file-upload-button for appearance:auto it will probably break websites. I wonder if any implementations/implementors are actually interested in changing this for appearance:auto to not be a |
That's just because we don't allow
What should it be instead? In general, |
Isn't this allowed since
I agree, this is my preference too |
It should per spec, yeah, but that concept wasn't around when we implemented it. So it is a Gecko bug that it doesn't work (in fact @lukewarlow is fixing some of that). |
I mean on input buttons in general aside from the file input. It's a separate bug that I need to file. |
It still seems a little concerning to me to impose even more requirements on |
I understand this concern but personally I think this is a special case. Browsers are largely in agreement on what a file input looks like. In LTR flows it's a button followed by some text and optionally the browser may include additional stuff (I believe WebKit might show thumbnails?). All browsers already match The main question I guess is that perhaps this pseudo element should only be element backed when in appearance: base mode? This would have to be a discussion for the csswg and I'm not sure if it makes sense (or even if it's possible?) for that to be conditional on the appearance. For me personally I think it would make the most sense to simply define this as being a real button element, and have file elements be special in the fact they're slightly defined for auto appearance mode for historical reasons. Especially given that if a browser has to use a real button in one mode they're likely to also just use that same element in auto mode given it's practically the same thing. |
Based on discussions in a previous whatnot I've gone ahead and made a spec PR to explicitly require a real button element. #11257 |
Was there a decision for |
I'm not aware of anything specifically related to appearance:base but this pseudo is defined to be element backed predating CSS forms. I think it would depend on the specific pseudos as to whether they are element backed or just tree abiding. Cc @nt1m in case I'm missing something. |
Our position has been that we want consistent behavior for all pseudo-elements that apply to form controls. It shouldn't be a per-pseudo-element choice. From that perspective not having them be element-backed is probably more tenable. |
That's the first I've heard of that and it's slightly concerning to me. Rather than have separate conversations in CSS and in html I'm adding this to the joint tasks force meeting for discussion. |
What is the issue with the HTML Standard?
Currently the file upload control rendering just says:
WebKit and Chromium implement this using
<input type="button">
and Firefox uses<button>
. Historically this wasn't observably different. But CSS now defines::file-selector-button
as an element backed pseudo element. Input buttons and real buttons don't behave the same for various pseudo elements. So the spec being ambiguous here could lead to interop issues.::before
and::after
don't work on input buttons in any browser, but do on real buttons.::first-letter
doesn't work on input buttons in any browser, but does on real buttons.::first-line
doesn't work on input buttons in Firefox, but does on real buttons.The text was updated successfully, but these errors were encountered: