Re: [WSG] Help with fieldset in a li
Firstly, am I using fieldset and legend in the correct semantic manner? My understanding is that fieldset is meant to group all the similar form elements together, not to diferentiate each input.A group of numbered questions are all related to each other, and the entire thing should be in one fieldset with one legend. If you were to add a second group of numbered questions starting the numbers over again because they are related to each other, but not to the first group of numbered questions, then you would use a second fieldset and legend. (a new one, not nested) At least this is how I've interepreted and used the fieldset. An everyday example is a login form. The fieldset goes around the username and password text boxes as well as the radio button for remembering your password, with the legend on the login text. Any other fields like submitting for a lost password would be in a separate fieldset with new legend of forgotten password. -- Susan R. Grossman [EMAIL PROTECTED] ** 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] Help with fieldset in a li
Firstly, am I using fieldset and legend in the correct semantic manner? Fieldset and legend elements are useful for explicitly identifying groups of form controls and assigning a label [legend] that relates to a group of controls. The example of their use you provided looks fine. Fieldsets can also be nested to identify sub-groups there are a few examples (with code) of their use here: http://www.nils.org.au/ais/web/resources/WSG_Oct_04/slide16.html with regards Steven Faulkner Web Accessibility Consultant National Information Library Service (NILS) 454 Glenferrie Road Kooyong Victoria 3144 Phone: (613) 9864 9281 Fax: (613) 9864 9210 Email: [EMAIL PROTECTED] National Information Library Service A subsidiary of RBS.RVIB.VAF Ltd. Damian Sweeney [EMAIL PROTECTED]To: [EMAIL PROTECTED] .edu.au cc: Sent by: Subject: [WSG] Help with fieldset in a li [EMAIL PROTECTED] group.org 28/10/2004 01:25 PM Please respond to wsg Hi folks, I'm having some trouble with a series of questions in a questionnaire that I'd like to put in an ordered list. I'd like to use fieldset and legend to mark up each question, thereby separating them easily for people with assistive devices. However, I'd also like to keep the original look and feel pre-fieldset for 'unassisted' users. An example of the differences can be found at : http://members.iinet.net.au/~damianfs/sample.html Safari and Opera 7.5 on the Mac seem to handle this conversion well, but Firefox and IE tend to put the list marker under level of the legend. So, a couple of questions: Firstly, am I using fieldset and legend in the correct semantic manner? Secondly, if I am using it correctly, are there suggestions for fixing the display in Firefox and IE? Many thanks, Damian -- Damian Sweeney Instructional Designer, AIRport Project Equity, Language and Learning Programs University of Melbourne 723 Swanston St Parkville 3010 www.services.unimelb.edu.au/ellp/ ph 03 8344 9370, fax 03 9349 1039 This email and any attachments may contain personal information or information that is otherwise confidential or the subject of copyright. Any unauthorised use, disclosure or copying of any part of it is prohibited. The University does not warrant that this email or any attachments are free from viruses or defects. Please check any attachments for viruses and defects before opening them. If this email is received in error please delete it and notify us by return email or by phoning (03) 8344 9370. ** 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] Help with fieldset in a li
One benefit of using fieldset and legend for screen reader users is that nearly all readers will read the legend before every input label within a fieldset. This can be very helpful with forms that require the same information within different sections of the form. For example, if you need put in name, phone number etc for a number of different people, the form input labels for each person will be the same - the layout of the form may make the different sections of the form obvious for visual users of the site, but the difference may not be obvious if you can't see. However, when you use fieldset and legend (with say a legend of purchaser for one person) then the reader will read the labels within this fieldset as purchaser name, purchaser phone number etc. An article with some more information about form accessibility can be found at http://www.usability.com.au/resources/forms.cfm Hope this is helpful Roger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Susan R. Grossman Sent: Friday, 29 October 2004 1:28 AM To: [EMAIL PROTECTED] Subject: Re: [WSG] Help with fieldset in a li Firstly, am I using fieldset and legend in the correct semantic manner? My understanding is that fieldset is meant to group all the similar form elements together, not to diferentiate each input.A group of numbered questions are all related to each other, and the entire thing should be in one fieldset with one legend. If you were to add a second group of numbered questions starting the numbers over again because they are related to each other, but not to the first group of numbered questions, then you would use a second fieldset and legend. (a new one, not nested) At least this is how I've interepreted and used the fieldset. An everyday example is a login form. The fieldset goes around the username and password text boxes as well as the radio button for remembering your password, with the legend on the login text. Any other fields like submitting for a lost password would be in a separate fieldset with new legend of forgotten password. -- Susan R. Grossman [EMAIL PROTECTED] ** 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] Help with fieldset in a li
I notice that some people nest the input within the legend whereas I don't: Example: label for=nameName:br / input type=text name=name id=name size=55 //label or mine: label for=nameName:/labelbr / input type=text name=name id=name size=55 / Does it make any difference? The ID ties them together anyway so I think not. P -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Web Usability Sent: Friday, October 29, 2004 9:35 AM To: [EMAIL PROTECTED] Subject: RE: [WSG] Help with fieldset in a li One benefit of using fieldset and legend for screen reader users is that nearly all readers will read the legend before every input label within a fieldset. This can be very helpful with forms that require the same information within different sections of the form. For example, if you need put in name, phone number etc for a number of different people, the form input labels for each person will be the same - the layout of the form may make the different sections of the form obvious for visual users of the site, but the difference may not be obvious if you can't see. However, when you use fieldset and legend (with say a legend of purchaser for one person) then the reader will read the labels within this fieldset as purchaser name, purchaser phone number etc. An article with some more information about form accessibility can be found at http://www.usability.com.au/resources/forms.cfm Hope this is helpful Roger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Susan R. Grossman Sent: Friday, 29 October 2004 1:28 AM To: [EMAIL PROTECTED] Subject: Re: [WSG] Help with fieldset in a li Firstly, am I using fieldset and legend in the correct semantic manner? My understanding is that fieldset is meant to group all the similar form elements together, not to diferentiate each input.A group of numbered questions are all related to each other, and the entire thing should be in one fieldset with one legend. If you were to add a second group of numbered questions starting the numbers over again because they are related to each other, but not to the first group of numbered questions, then you would use a second fieldset and legend. (a new one, not nested) At least this is how I've interepreted and used the fieldset. An everyday example is a login form. The fieldset goes around the username and password text boxes as well as the radio button for remembering your password, with the legend on the login text. Any other fields like submitting for a lost password would be in a separate fieldset with new legend of forgotten password. -- Susan R. Grossman [EMAIL PROTECTED] ** 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 ** ** 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] Help with fieldset in a li
Thanks to Susan, Steven and Roger for the replies so far. A couple of questions for clarification: * If no fieldset is used for the individual questions, how does a screen reader associate the question with the radio group? The label will differentiate the options, but what about the questions? * It sounds like a long legend is a bad idea - correct? * In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? * If fieldsets are nested, how does a screen reader handle the legends? Are they concatenated for each form control or is only the legend from the parent fieldset used? Cheers, Damian One benefit of using fieldset and legend for screen reader users is that nearly all readers will read the legend before every input label within a fieldset. This can be very helpful with forms that require the same information within different sections of the form. For example, if you need put in name, phone number etc for a number of different people, the form input labels for each person will be the same - the layout of the form may make the different sections of the form obvious for visual users of the site, but the difference may not be obvious if you can't see. However, when you use fieldset and legend (with say a legend of purchaser for one person) then the reader will read the labels within this fieldset as purchaser name, purchaser phone number etc. An article with some more information about form accessibility can be found at http://www.usability.com.au/resources/forms.cfm Hope this is helpful Roger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Susan R. Grossman Sent: Friday, 29 October 2004 1:28 AM To: [EMAIL PROTECTED] Subject: Re: [WSG] Help with fieldset in a li Firstly, am I using fieldset and legend in the correct semantic manner? My understanding is that fieldset is meant to group all the similar form elements together, not to diferentiate each input.A group of numbered questions are all related to each other, and the entire thing should be in one fieldset with one legend. If you were to add a second group of numbered questions starting the numbers over again because they are related to each other, but not to the first group of numbered questions, then you would use a second fieldset and legend. (a new one, not nested) At least this is how I've interepreted and used the fieldset. An everyday example is a login form. The fieldset goes around the username and password text boxes as well as the radio button for remembering your password, with the legend on the login text. Any other fields like submitting for a lost password would be in a separate fieldset with new legend of forgotten password. -- Susan R. Grossman [EMAIL PROTECTED] -- Damian Sweeney Instructional Designer, AIRport Project Equity, Language and Learning Programs University of Melbourne 723 Swanston St Parkville 3010 www.services.unimelb.edu.au/ellp/ ph 03 8344 9370, fax 03 9349 1039 This email and any attachments may contain personal information or information that is otherwise confidential or the subject of copyright. Any unauthorised use, disclosure or copying of any part of it is prohibited. The University does not warrant that this email or any attachments are free from viruses or defects. Please check any attachments for viruses and defects before opening them. If this email is received in error please delete it and notify us by return email or by phoning (03) 8344 9370. ** 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] Help with fieldset in a li
In my opinion your approach is the most appropriate. Label for should be used for labels. And, the ID associates the input with that label. However in relation to legend, a whole bunch of labels and inputs can be presented within one legend. Roger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Peter Firminger Sent: Friday, 29 October 2004 10:21 AM To: [EMAIL PROTECTED] Subject: RE: [WSG] Help with fieldset in a li I notice that some people nest the input within the legend whereas I don't: Example: label for=nameName:br / input type=text name=name id=name size=55 //label or mine: label for=nameName:/labelbr / input type=text name=name id=name size=55 / Does it make any difference? The ID ties them together anyway so I think not. P -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Web Usability Sent: Friday, October 29, 2004 9:35 AM To: [EMAIL PROTECTED] Subject: RE: [WSG] Help with fieldset in a li One benefit of using fieldset and legend for screen reader users is that nearly all readers will read the legend before every input label within a fieldset. This can be very helpful with forms that require the same information within different sections of the form. For example, if you need put in name, phone number etc for a number of different people, the form input labels for each person will be the same - the layout of the form may make the different sections of the form obvious for visual users of the site, but the difference may not be obvious if you can't see. However, when you use fieldset and legend (with say a legend of purchaser for one person) then the reader will read the labels within this fieldset as purchaser name, purchaser phone number etc. An article with some more information about form accessibility can be found at http://www.usability.com.au/resources/forms.cfm Hope this is helpful Roger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Susan R. Grossman Sent: Friday, 29 October 2004 1:28 AM To: [EMAIL PROTECTED] Subject: Re: [WSG] Help with fieldset in a li Firstly, am I using fieldset and legend in the correct semantic manner? My understanding is that fieldset is meant to group all the similar form elements together, not to diferentiate each input.A group of numbered questions are all related to each other, and the entire thing should be in one fieldset with one legend. If you were to add a second group of numbered questions starting the numbers over again because they are related to each other, but not to the first group of numbered questions, then you would use a second fieldset and legend. (a new one, not nested) At least this is how I've interepreted and used the fieldset. An everyday example is a login form. The fieldset goes around the username and password text boxes as well as the radio button for remembering your password, with the legend on the login text. Any other fields like submitting for a lost password would be in a separate fieldset with new legend of forgotten password. -- Susan R. Grossman [EMAIL PROTECTED] ** 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 ** ** 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] Help with fieldset in a li
On Fri, 29 Oct 2004 10:20:54 +1000, Peter Firminger wrote: Does it make any difference? The ID ties them together anyway so I think not. As I understand it, these are the 2 alternate, valid, ways of putting a label on a field. Note that if you wrap the label around the input, you don't need the 'for', but I could be wrong as I don't do that either :) Lea -- Lea de Groot Elysian Systems - I Understand the Internet http://elysiansystems.com/ Search Engine Optimisation, Usability, Information Architecture, Web Design Brisbane, Australia ** 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] Help with fieldset in a li
If no fieldset is used for the individual questions, how does a screen reader associate the question with the radio group? The label will differentiate the options, but what about the questions? Essentially it does not as their is no explicit structural association between the radio buttons and the question. while there is an implicit association [they are within the same container element/ they are contiguous visually and or in the reading order] for the most part the screen reader only knows what you tell it through the code. If fieldsets are nested, how does a screen reader handle the legends? Are they concatenated for each form control or is only the legend from the parent fieldset used? using JAWS 4.51 the legends are not concatenated. It sounds like a long legend is a bad idea - correct? I'd agree with this. In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? I think while desirable it is not necessary, unless you have a radio button or checkbox group. But why not use the fieldset element to structure the form instead of putting in a div or some other container? remeber the legend is optional. with regards Steven Faulkner Web Accessibility Consultant National Information Library Service (NILS) 454 Glenferrie Road Kooyong Victoria 3144 Phone: (613) 9864 9281 Fax: (613) 9864 9210 Email: [EMAIL PROTECTED] National Information Library Service A subsidiary of RBS.RVIB.VAF Ltd. Damian Sweeney [EMAIL PROTECTED]To: [EMAIL PROTECTED] .edu.au cc: Sent by: Subject: RE: [WSG] Help with fieldset in a li [EMAIL PROTECTED] group.org 29/10/2004 10:29 AM Please respond to wsg Thanks to Susan, Steven and Roger for the replies so far. A couple of questions for clarification: * If no fieldset is used for the individual questions, how does a screen reader associate the question with the radio group? The label will differentiate the options, but what about the questions? * It sounds like a long legend is a bad idea - correct? * In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? * If fieldsets are nested, how does a screen reader handle the legends? Are they concatenated for each form control or is only the legend from the parent fieldset used? Cheers, Damian One benefit of using fieldset and legend for screen reader users is that nearly all readers will read the legend before every input label within a fieldset. This can be very helpful with forms that require the same information within different sections of the form. For example, if you need put in name, phone number etc for a number of different people, the form input labels for each person will be the same - the layout of the form may make the different sections of the form obvious for visual users of the site, but the difference may not be obvious if you can't see. However, when you use fieldset and legend (with say a legend of purchaser for one person) then the reader will read the labels within this fieldset as purchaser name, purchaser phone number etc
RE: [WSG] Help with fieldset in a li
Yes, my use of the word legend should have read label. D'oh! P However in relation to legend, a whole bunch of labels and inputs can be presented within one legend. Roger I notice that some people nest the input within the legend whereas I don't: ** 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] Help with fieldset in a li
In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? I think while desirable it is not necessary, unless you have a radio button or checkbox group. But why not use the fieldset element to structure the form instead of putting in a div or some other container? remeber the legend is optional. The main reason for using an ol is that this is a well-established convention for questionnaires and helps to structure the feedback for responses (which is often per question for my purposes). Also, I would have thought that modern screen readers would be able to group radio and checkbox groups based on name attributes. Is this not the case? Anyway, based on the responses I'm currently thinking I'll do things this way: http://members.iinet.net.au/~damianfs/sample2.html where the fieldset only encloses the radio buttons in a group. This fixes the positioning problem for the list items in Firefox and IE and seems semantically sound to me. No legends are used. Thanks again for the excellent responses, Damian -- Damian Sweeney Instructional Designer, AIRport Project Equity, Language and Learning Programs University of Melbourne 723 Swanston St Parkville 3010 www.services.unimelb.edu.au/ellp/ ph 03 8344 9370, fax 03 9349 1039 This email and any attachments may contain personal information or information that is otherwise confidential or the subject of copyright. Any unauthorised use, disclosure or copying of any part of it is prohibited. The University does not warrant that this email or any attachments are free from viruses or defects. Please check any attachments for viruses and defects before opening them. If this email is received in error please delete it and notify us by return email or by phoning (03) 8344 9370. ** 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] Help with fieldset in a li
Hi Damian, I misunderstood what you meant when you wrote: In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? I didn't realize that you will still referring to your example, I thought you meant a simple form such as a text label + input + submit. I now understand and think that the use of a list in you form is appropriate. Also, I would have thought that modern screen readers would be able to group radio and checkbox groups based on name attributes. Is this not the case? from what i have read they do not group controls in this way. The info here: The HTML Forms Challenge [http://www.freedomscientific.com/HTML_challenge/files/forms_challenge.html] may be helpful for better understanding how a screen reader (JAWS) interacts with forms. with regards Steven Faulkner Web Accessibility Consultant National Information Library Service (NILS) 454 Glenferrie Road Kooyong Victoria 3144 Phone: (613) 9864 9281 Fax: (613) 9864 9210 Email: [EMAIL PROTECTED] National Information Library Service A subsidiary of RBS.RVIB.VAF Ltd. Damian Sweeney [EMAIL PROTECTED]To: [EMAIL PROTECTED] .edu.au cc: Sent by: Subject: RE: [WSG] Help with fieldset in a li [EMAIL PROTECTED] group.org 29/10/2004 12:20 PM Please respond to wsg In a page where there is only one form and one semantically linked set of form controls is a fieldset necessary/desirable? I think while desirable it is not necessary, unless you have a radio button or checkbox group. But why not use the fieldset element to structure the form instead of putting in a div or some other container? remeber the legend is optional. The main reason for using an ol is that this is a well-established convention for questionnaires and helps to structure the feedback for responses (which is often per question for my purposes). Also, I would have thought that modern screen readers would be able to group radio and checkbox groups based on name attributes. Is this not the case? Anyway, based on the responses I'm currently thinking I'll do things this way: http://members.iinet.net.au/~damianfs/sample2.html where the fieldset only encloses the radio buttons in a group. This fixes the positioning problem for the list items in Firefox and IE and seems semantically sound to me. No legends are used. Thanks again for the excellent responses, Damian -- Damian Sweeney Instructional Designer, AIRport Project Equity, Language and Learning Programs University of Melbourne 723 Swanston St Parkville 3010 www.services.unimelb.edu.au/ellp/ ph 03 8344 9370, fax 03 9349 1039 This email and any attachments may contain personal information or information that is otherwise confidential or the subject of copyright. Any unauthorised use, disclosure or copying of any part of it is prohibited. The University does not warrant that this email or any attachments are free from viruses or defects. Please check any attachments for viruses and defects before opening them. If this email is received in error please delete it and notify us by return email or by phoning (03) 8344 9370
Re: [WSG] Help with fieldset in a li
On Thu, 28 Oct 2004 13:25:29 +1000, Damian Sweeney [EMAIL PROTECTED] wrote: Hi folks, snip Firstly, am I using fieldset and legend in the correct semantic manner? Many thanks, It was my understanding that fieldsets and legends were only to be used with forms to make them easier to use. Although I'm not 100% sure that using them in your case would be incorrect. - Clayton Clayton Lengel-Zigich http://www.lengelzigich.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 **