W3C home > Mailing lists > Public > www-html@w3.org > May 2007

Web-Forms 2.0: upload. Button apperance

From: <w3c@dv-life.ru>
Date: Fri, 11 May 2007 04:53:38 +0400 (MSD)
Message-ID: <46152.217.150.32.243.1178844818.webmail@wmail.masterhost.ru>
To: www-html@w3.org

I am reading
http://www.whatwg.org/specs/web-forms/current-work/#upload
and see

>>A compliant UA could, upon encountering this form, provide a  <<
>>"Record" button instead of, or in addition to, the more usual <<
>>"Browse" button. Selecting this button could then bring up a  <<
>>sound recording application.                                  <<

Why button appearanse is UA-dependent? I can't find any example
where caption of button is user-defined. CSS-styling of
<input type-file> is a problem also.

I suppose to divide upload string and button, like that:

<form action="/weblog/submit" method="post" enctype="multipart/form-data">
<label>
Attach your audio-blog sound file:
<input class="blog_upload_edit" type="file" name="blog" accept="audio/*"/>

<input class="blog_upload_baton" type="browse" linked_to="blog"
text="Select *.ogg file!" />

</label>
<input type="submit" value="Blog!"/>
</form>

As you can see button is separated from edit field, and we can apply CSS
rules for edit and button:
.blog_upload_edit {color: red;}
.blog_upload_baton {color: green;}

If browser don't support this mechanism, then it can ignore <input
class="blog_upload_baton"> and render generic browse button.

I think it's a clear and powerful mechanism to styling upload controls.
Received on Friday, 11 May 2007 00:53:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:10 GMT