[whatwg] File Upload Control

On 19 Aug, 2004, at 3:17 AM, Greg Kilwein wrote:
> ...
> As far as styling is concerned, I would find it very valuable to be 
> able to style the text box and the button on those platforms or UAs 
> that allow styling of form buttons.

That's making assumptions about both the UA and the underlying OS that 
may not be true. A present case is Safari, where the file upload 
control has no "text box" in the first place.

Future cases are even less predictable. For example, a future OS -- 
perhaps on a PDA or mobile phone of some sort -- may not use filenames 
at all (just like most physical-world documents don't); in that case 
there would be no text box. Another, or even the same, future OS may 
end the amusing distinction between file managers and filepickers; in 
that case there would be no button. In both cases, styling the control 
as if it contained a text field and a button would likely produce 
undesirable results.

(This styling problem is worst for file upload controls, but it also 
exists for other controls. For example, Microsoft Windows makes 
drop-down listboxes -- as used for <select> -- look like text fields, 
even when they cannot be typed in. An author who styles them with this 
appearance in mind will often produce undesirable results on almost 
every other platform.)

> I go to great lengths to develop a polished UI for my web application, 
> and an unstylable (or unpredictably styleable, as is the case with 
> current browsers) file upload control is an eyesore on an
> otherwise professional looking application.

In my experience, Web authors style form controls badly much more often 
than they style them well. But I guess that's one of the reasons I use 
a UA that ignores most such styling.

-- 
Matthew Thomas
http://mpt.net.nz/

Received on Wednesday, 18 August 2004 19:34:06 UTC