Web-Forms 2.0: upload. Button apperance

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 UTC