[thelist] accessible way to indicate that a form field is required

Julian Rickards julian.rickards at gmail.com
Fri Nov 17 09:50:30 CST 2006

What are you going to do with class="required"? Color the text red? Add a
yellow star background image? Use the CSS definition -> content: "This field
is required";? Use JavaScript to make the text flash? All of these are good
until someone comes along with a browser that doesn't support either CSS or
JS (or has them disabled).

If a person can't determine that a field is required from the raw HTML, then
you have failed. However, that doesn't mean you can't spice it up with JS or
CSS both of which are supposed to be progressive enhancement of the HTML.


On 17/11/06, kasimir-k <kasimir.k.lists at gmail.com> wrote:
> Julian Rickards scribeva in 17/11/2006 13:29:
> > However, all this aside, I am not convinced that CSS is the medium
> through
> > which you should indicate that a particular field is required.
> Maybe not CSS as such, but class: <input class="required" ...>
> And then use CSS to give it appropriate presentation on various kinds of
> user agents. Using class attribute in a semantically meaningful way can
> not be a bad thing, can it?
> .k
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

Website: http://jrickards.ca
Blog: http://pen-and-ink.ca

More information about the thelist mailing list