[WSG] browsers render differently with Optroup
I am working on a web form that has Optgroup in it, and the first time I realized browsers render this attribute differently. I have something like this: optgroup label=United States option label=CA value=CaliforniaCalifornia/option /optgroup In Firefox, it display: California In Safari and Opera, it displays: CA p/s. Haven't check on IE yet. According to w3c's html spec http://www.w3.org/TR/html4/interact/forms.html#form-labels I made an example page with markup copied from the above page http://lotusfromthemud.com/option.html represents the following grouping: None PortMaster 3 3.7.1 3.7 3.5 PortMaster 2 3.7 3.5 IRX 3.7R 3.5R In 17.6.1 Pre-selected options, scolled down to the end of 17.6.1, It says: A graphical user agent might render this as : (screenshot from old Netscape I think) Gecko based browsers are graphical user agents yet Safari and Opera are not? (!!!) Screen reader isn't graphic user agent, so it will read 'CA instead of 'California'? It's quite annoying if I have to add : option label=California value=CaliforniaCalifornia/option tee *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] browsers render differently with Optroup
On Oct 24, 2007, at 3:27 PM, Tee G. Peng wrote: I am working on a web form that has Optgroup in it, and the first time I realized browsers render this attribute differently. IE Mac displays 'CA' in your 1st example IE 7 Win displays 'CA' in your 1st example Opera 9.5 alpha: idem ditto. I made an example page with markup copied from the above page http://lotusfromthemud.com/option.html Under 17.6.1 it says (specifically for label in option): http://www.w3.org/TR/html401/interact/forms.html#adef-label-OPTION label = text [CS] This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. That sounds, to me, as validating what Safari, IE Mac, IE Win Camino are doing. Note that Firefox is not wrong by the description given above. Philippe --- Philippe Wittenbergh http://emps.l-c-n.com *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] browsers render differently with Optroup
On Oct 24, 2007, at 12:14 AM, Philippe Wittenbergh wrote: On Oct 24, 2007, at 3:27 PM, Tee G. Peng wrote: I am working on a web form that has Optgroup in it, and the first time I realized browsers render this attribute differently. IE Mac displays 'CA' in your 1st example IE 7 Win displays 'CA' in your 1st example Opera 9.5 alpha: idem ditto. I made an example page with markup copied from the above page http://lotusfromthemud.com/option.html Under 17.6.1 it says (specifically for label in option): http://www.w3.org/TR/html401/interact/forms.html#adef-label-OPTION label = text [CS] This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. That sounds, to me, as validating what Safari, IE Mac, IE Win Camino are doing. Note that Firefox is not wrong by the description given above. I am sorry I only understand this thing half. We must use 'label' right? option label=3.7 value=pm2_3.7PortMaster 2 with ComOS 3.7/ option So Firefox reads PortMaster 2 with ComOS 3.7 and the rest of the browsers read from 'label' attribute, so the screen reader? Can 'value' be removed? Everytime I work on a web form, the same qeustion kept throwing back to me. Is there any attribute one can saftly remove without causing browsers, screen reader and form script suffer? label and ID are needed, Name also needed for the form script I use; this leaves the 'value' which I never able to decide the *value* of its usage. I really find a markup like this is too much label for=myformMy form /label input name=myform id=myform value=myform tee *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] browsers render differently with Optroup
On Oct 24, 2007, at 10:37 PM, Tee G. Peng wrote: Under 17.6.1 it says (specifically for label in option): http://www.w3.org/TR/html401/interact/forms.html#adef-label-OPTION label = text [CS] This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label. That sounds, to me, as validating what Safari, IE Mac, IE Win Camino are doing. Note that Firefox is not wrong by the description given above. I am sorry I only understand this thing half. ... Can 'value' be removed? Everytime I work on a web form, the same qeustion kept throwing back to me. Is there any attribute one can saftly remove without causing browsers, screen reader and form script suffer? label and ID are needed, Name also needed for the form script I use; this leaves the 'value' which I never able to decide the *value* of its usage. I really find a markup like this is too much label for=myformMy form /label input name=myform id=myform value=myform I think you are confused :-) There is a difference between label the html _element_ and label the _attribute_ on option and optgroup element: label for=myformMy form /label input name=myform id=myform value=myform attribute select id=myselectoption label=mylabel value=myvaluestring in option/option/select The 'value' attribute on option (and other form controls) is required for back-end processing (so that your script knows what to do with all the stuff the form feeds it). The 'label' attribute is always optional and _can_ be used by the UA for display purposes. 'name' is also required to identify the form control. Philippe --- Philippe Wittenbergh http://emps.l-c-n.com *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] browsers render differently with Optroup
On 24 Oct 2007, at 14:37, Tee G. Peng wrote: We must use 'label' right? option label=3.7 value=pm2_3.7PortMaster 2 with ComOS 3.7/ option The label attribute is only required on optgroup; it is optional on option. If browsers are behaving differently when it's used on option, just remove it. http://www.w3.org/TR/html4/index/attributes.html is a quick way to check whether an attribute is required or not. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***