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.>
To: www-html@w3.org

I am reading
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">
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!" />

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

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

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:03 UTC