Re: [WSG] Semantic Form - Person's Title

2006-03-17 Thread Ian Anderson

Richard Czeiger wrote:


Can I get a consensus that this is actually the right way to do it?
It feels right, but I'd like the opinion of my venerable peers  :o)


Looks right to me. Note that in a large site with a lot of form pages 
(online banking, for example) putting meaningful IDs for all the inputs 
is wasted effort. They just need to be unique and to correlate with the 
appropriate label.


For speed, I use sequentially numbered IDs for radios or checkboxes; r1, 
r2, r3. I find it makes the process much faster on autopilot, as it 
were. Otherwise you spend at least half your time thinking up names that 
don't suck...


If the other inputs already have meaningful ids (Dreamweaver can insert 
then automatically when you name them, for instance) I'd use the default 
ones, otherwise I'd use something like t1, t2, t3 and so on for those too.


Cheers

Ian

--
_
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net - Online code library
File, manage and re-use your code snippets & links
http://snippetz.net

**
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] Semantic Form - Person's Title

2006-03-16 Thread Micky Mourelo
If you a referring to the for/id issue, yes, that is the way. As for
the rest of the xhtml depends on what you want to achieve. But looks
ok to me.
**
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] Semantic Form - Person's Title

2006-03-16 Thread Richard Czeiger
Sorry Mickey - didn't mean to knit-pick, but what you're saying is that it 
should look something like this?



   Title
   value="Mr" />Mr
   value="Mrs" />Mrs
   value="Miss" />Ms



Can I get a consensus that this is actually the right way to do it?
It feels right, but I'd like the opinion of my venerable peers  :o)

Now just have to figure out a way to style the legend properly.

Cheers,
Richard

- Original Message - 
From: "Micky Mourelo" <[EMAIL PROTECTED]>

To: 
Sent: Friday, March 17, 2006 4:38 AM
Subject: Re: [WSG] Semantic Form - Person's Title


To Richard Czeiger:

That's one of the problems of copy & paste :o) anyway, I thought it
was obvious that my code was just an example, maybe should have
preceeded it with "pseudo-code", but just in case: never leave name=""
in blank and never use a "field" id for a field :op.

This discussion is getting old. Legends are optional from XHTML 1.0 on
and the for attribute is an aid for ie users, so use it since it is
not wrong (maybe just redundant, but not wrong in any way) to use it
at all.
**
The discussion list for  http://webstandardsgroup.org/

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



**
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] Semantic Form - Person's Title

2006-03-16 Thread Micky Mourelo
To Richard Czeiger:

That's one of the problems of copy & paste :o) anyway, I thought it
was obvious that my code was just an example, maybe should have
preceeded it with "pseudo-code", but just in case: never leave name=""
in blank and never use a "field" id for a field :op.

This discussion is getting old. Legends are optional from XHTML 1.0 on
and the for attribute is an aid for ie users, so use it since it is
not wrong (maybe just redundant, but not wrong in any way) to use it
at all.
**
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] Semantic Form - Person's Title

2006-03-16 Thread Ian Anderson

Lachlan Hunt wrote:

Of course not in IE, but IE is broken and I consider that acceptable 
graceful degradation.


Since 90% of web users are using this "broken" industry standard
browser, I don't think I would share your acceptance of this, especially 
when it is so easy to make it work.


All users benefit from the enhanced clickable area, especially if using
laptop trackpads as I do a lot of the time. It's very important that
labels are clickable with radios and checkboxes for mobility impaired
users, so to intentionally omit this on the grounds of browser
"brokenness" is startlingly unhelpful.

I wonder how much people's commercial experience and background
influences their opinions on issues like this. It would be interesting
to take a survey of how many work in web shops, public sector
organisations and so on and see if there's a correlation of any sort
with how people approach or prioritise issues.

Looks like it's required to me and it's the same in both Strict and 
Transitional DTDs.


A fieldset with no legend passes validation for both XHTML 1.0
transitional and XHTML 1.0 strict. Which DTDs are you thinking of? Did 
you do your own test case?


Cheers

Ian

--
_
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net - Online code library
File, manage and re-use your code snippets & links
http://snippetz.net

**
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] Semantic Form - Person's Title

2006-03-16 Thread Kenny Graham
> I know it was required in HTML 4.01, but it looks optional in XHTML.

Also supported by the following comment in the DTD:

  The fieldset element is used to group form fields.
  Only one legend element should occur in the content
  and IF present should only be preceded by whitespace.

Emphasis mine.
**
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] Semantic Form - Person's Title

2006-03-16 Thread Richard Czeiger

Hi Lachlan - I think this is correct for HTML4.01 but not for XHTML



http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

Correct me if I'm wrong, but I thought the pipe meant "or" in BNF 
notation...


Also in regards to the IE thing, does it hurt? Does it break validation? 
Does it provide more information (even thgouh its implicit)?


There seem to be no downsides in using this for IE. Yes it's 'broken' as you 
put it, but you simply can't design sites in the real world and not cater to 
IE - it's just not a viable option. It sounds like what you're recommending 
is to ignore a feature that makes forms for useable for 85% of the market 
becuase the technology used by that market doesn't measure up to the 
standard. Would you really impair usability when the cost is a couple of 
extra bytes that does not break code validation anyway?


Just a thought...

R  :o)


- Original Message - 
From: "Lachlan Hunt" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, March 15, 2006 10:38 PM
Subject: Re: [WSG] Semantic Form - Person's Title



Micky Mourelo wrote:

You don't need to set the for and id attributes when the input is within
the label because the association is implicit.


Not on IE. IE won't make the label clickable unless it is associated
through "for".


Of course not in IE, but IE is broken and I consider that acceptable 
graceful degradation.



The legend is a required child of fieldset.


Specwise the DTD seems to say it is optional,


Really?  Let's see:

group -->


Looks like it's required to me and it's the same in both Strict and 
Transitional DTDs.



and the validator agrees.


I'd like to see your test case that demonstrates that.

--
Lachlan Hunt
http://lachy.id.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
**





**
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] Semantic Form - Person's Title

2006-03-16 Thread Richard Czeiger
Ummm, mickey - just spotted the fact that you have multiple identical 
IDs

How does this work? Certainly won't validate..

R  :o)

- Original Message - 
From: "Micky Mourelo" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, March 15, 2006 8:08 PM
Subject: Re: [WSG] Semantic Form - Person's Title


Hi Richard,

I looked at your example. You need not use a fieldset for every
input. All you have to do is put the input inside the label, set the
label to block and a margin-left to the input; and save the fieldset
for a real field set. As for the title (Mr, Ms. etc) the thing to do
would be:

Title
Mr.Ms.


In this case you would set the labels to inline.

But in reality I would recommend either forgetting about the legend
(p?), almost impossible to style, or to position:absolute it; not that
problematic.
**
The discussion list for  http://webstandardsgroup.org/

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



**
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] Semantic Form - Person's Title

2006-03-16 Thread Kenny Graham
> 
>
> Looks like it's required to me and it's the same in both Strict and
> Transitional DTDs.

I'm looking at the XHTML 1.0 Strict DTD right now and I see:


I know it was required in HTML 4.01, but it looks optional in XHTML.
**
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] Semantic Form - Person's Title

2006-03-16 Thread Lachlan Hunt

Lachlan Hunt wrote:

Micky Mourelo wrote:

The legend is a required child of fieldset.


Specwise the DTD seems to say it is optional,




Looks like it's required to me...


and the validator agrees.


I'd like to see your test case that demonstrates that.


I forgot that this is one of those undocumented changes (i.e. not listed 
in section 4) between HTML 4 and XHTML 1:





So, technically, yes it's optional in XHTML 1.

--
Lachlan Hunt
http://lachy.id.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] Semantic Form - Person's Title

2006-03-15 Thread Lachlan Hunt

Micky Mourelo wrote:

You don't need to set the for and id attributes when the input is within
the label because the association is implicit.


Not on IE. IE won't make the label clickable unless it is associated
through "for".


Of course not in IE, but IE is broken and I consider that acceptable 
graceful degradation.



The legend is a required child of fieldset.


Specwise the DTD seems to say it is optional,


Really?  Let's see:



Looks like it's required to me and it's the same in both Strict and 
Transitional DTDs.



and the validator agrees.


I'd like to see your test case that demonstrates that.

--
Lachlan Hunt
http://lachy.id.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] Semantic Form - Person's Title

2006-03-15 Thread Jens Grochtdreis

Lachlan Hunt wrote:

Micky Mourelo wrote:

...


You don't need to set the for and id attributes when the input is within 
the label because the association is implicit.




No, you don't need to. But it is better for the IE-users. With for and 
id, even those users can click on the label and get the input-field 
marked. Without these attributes only the users of real browsers get 
this nice behaviour. So it is good practice to use for even in a not 
needed case just because there exists this "browser-wannabee".


Greetings from Germany,

Jens Grochtdreis
**
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] Semantic Form - Person's Title

2006-03-15 Thread Micky Mourelo
> You don't need to set the for and id attributes when the input is within
> the label because the association is implicit.

Not on IE. IE won't make the label clickable unless it is associated
through "for".

> The legend is a required child of fieldset.

What do you mean by required? Accessibility issue? Specwise the DTD
seems to say it is optional, and the validator agrees.
**
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] Semantic Form - Person's Title

2006-03-15 Thread Lachlan Hunt

Micky Mourelo wrote:

...


You don't need to set the for and id attributes when the input is within 
the label because the association is implicit.



In this case you would set the labels to inline.

But in reality I would recommend either forgetting about the legend


The legend is a required child of fieldset.

--
Lachlan Hunt
http://lachy.id.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] Semantic Form - Person's Title

2006-03-15 Thread Micky Mourelo
Hi Richard,

 I looked at your example. You need not use a fieldset for every
input. All you have to do is put the input inside the label, set the
label to block and a margin-left to the input; and save the fieldset
for a real field set. As for the title (Mr, Ms. etc) the thing to do
would be:

Title
Mr.Ms.


In this case you would set the labels to inline.

But in reality I would recommend either forgetting about the legend
(p?), almost impossible to style, or to position:absolute it; not that
problematic.
**
The discussion list for  http://webstandardsgroup.org/

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