Re: [WSG] a required field marker in forms

2005-04-26 Thread Lachlan Hardy
Peter Ottery wrote:
1) I'm curious if the use of an asterix to indicate a required field,
and the way I've done it, is ok accessibility-wise or if theres
anything else i could/should do...?
G'day Pete
I've recently undertaken the same work myself. I'm beginning to 
undertake a very OO approach to HTML and CSS. I'm creating quite a 
collection of code snippets. As such, I've recently addressed similar issues

My understanding is that some screenreaders simply identify an isolated 
asterix as a grammatical entity. This will still work to a certain 
degree, but if there are any 'grammatical entities' in use on the page, 
or probably the site, it could cause confusion. It certainly doesn't 
indicate the kind of effect I had always assumed it did

I've changed to actually using the word required. Near as I can tell, 
this is the only guaranteed way of achieving the appropriate effect

Perhaps Patrick, Russ or one of the other accessibility gurus can 
confirm or deny?

Cheers
Lachlan
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


[WSG] a required field marker in forms

2005-04-22 Thread Peter Ottery
I've set up a base standard form layout to use as a starting point for
projects requiring a form - with text input boxes, check box's, radio
buttons, a select menu, and a text area that could all be swapped in
or out or duplicated relatively easily.

here's the page:
http://skunkworks.farcrycms.com/wsg/forms.html

2 questions, 

1) I'm curious if the use of an asterix to indicate a required field,
and the way I've done it, is ok accessibility-wise or if theres
anything else i could/should do...?

2) theres also an error message placement that would flick on if
you've missed a required field:
http://skunkworks.farcrycms.com/wsg/forms_error.html

the error message seems to be displaying fine across a wide range of
browsers (courtesy of browsercam:
http://www.browsercam.com/public.aspx?proj_id=157477) except good ol
mac ie5. if anyone can see an easy fix for mac ie5 that'd be most
welcome.

cheers,
pete

~~
Peter Ottery ~ Senior Designer
Daemon Pty Ltd 
17 Roslyn Gardens
Elizabeth Bay NSW 2011 
www.daemon.com.au
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] a required field marker in forms

2005-04-22 Thread Dmitry Baranovskiy
Hi Peter,
I am not shure about asteri, but I think it is not very usable that if
I click on the text near checkbox, checkbox doesn't change its state.

On 4/22/05, Peter Ottery [EMAIL PROTECTED] wrote:
 I've set up a base standard form layout to use as a starting point for
 projects requiring a form - with text input boxes, check box's, radio
 buttons, a select menu, and a text area that could all be swapped in
 or out or duplicated relatively easily.
 
 here's the page:
 http://skunkworks.farcrycms.com/wsg/forms.html
 
 2 questions,
 
 1) I'm curious if the use of an asterix to indicate a required field,
 and the way I've done it, is ok accessibility-wise or if theres
 anything else i could/should do...?
 
 2) theres also an error message placement that would flick on if
 you've missed a required field:
 http://skunkworks.farcrycms.com/wsg/forms_error.html
 
 the error message seems to be displaying fine across a wide range of
 browsers (courtesy of browsercam:
 http://www.browsercam.com/public.aspx?proj_id=157477) except good ol
 mac ie5. if anyone can see an easy fix for mac ie5 that'd be most
 welcome.
 
 cheers,
 pete
 
 ~~
 Peter Ottery ~ Senior Designer
 Daemon Pty Ltd
 17 Roslyn Gardens
 Elizabeth Bay NSW 2011
 www.daemon.com.au
 **
 The discussion list for  http://webstandardsgroup.org/
 
  See http://webstandardsgroup.org/mail/guidelines.cfm
  for some hints on posting to the list  getting help
 **
 
 


-- 
Best regards,
Dmitry Baranovskiy
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] a required field marker in forms

2005-04-22 Thread Peter Ottery
Dmitry wrote:
 Hi Peter,
 I am not shure about asteri, but I think it is not very usable that if
 I click on the text near checkbox, checkbox doesn't change its state.

for sure. that behaviour (thanks to using labels) works for me in PC
IE5+ and Firefox (which is a pretty large slice of users) in this
example.

what browser are you looking at it in?
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] a required field marker in forms

2005-04-22 Thread Jeremy Keith
Here's a little piece of DOM scripting that will redress the lack of  
label behaviour in Safari. It's basically just doing what's built in to  
many browsers: clicking on a label brings the associated from element  
into focus:

function makeLabelsWork() {
if (!document.getElementsByTagName) return false;
var allforms = document.getElementsByTagName('form');
for (var formcount=0;formcountallforms.length;formcount++) {
var labels = 
document.forms[formcount].getElementsByTagName('label');

for (var i=0;ilabels.length;i++) {
if (!labels[i].getAttribute('for')) break;
labels[i].formfield = labels[i].getAttribute('for');
			labels[i].formnumber = formcount;
	
			labels[i].onclick = function() {
	
 
eval('document.forms['+this.formnumber+'].'+this.formfield+'.focus()');
	
			}
		}
	}
}

You'll need to call the function when the document loads:
window.onload = function() {
makeLabelsWork();
}
It isn't targetted at any specific browser(s). If the browser already  
does this, then the script is just duplicating what's already there. If  
the browser doesn't have this behaviour by default, it has now.

HTH,
Jeremy
--
Jeremy Keith
a d a c t i o
http://adactio.com/
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**