RE: [WSG] accessibility/usability in a poll: check a radio button when focusing on a text input field
It MIGHT be possible to use CSS alone to show/hide the text field depending on the last option being clicked, but it would need a lot of testing. It would certainly be far easier to do this in JS, and as this is only an enhancement, not required functionality, I don't see an issue with doing it that way, unless you have a very specific user-base? Regards, Mike From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julián Landerreche Sent: Friday, May 23, 2008 5:58 AM To: wsg@webstandardsgroup.org Subject: [WSG] accessibility/usability in a poll: check a radio button when focusing on a text input field Hi. Probably this can't be done without (unobstrusive) Javascript. In simple polls, sometimes there is an Other option that is also provided with a text input so visitors can give some feedback on this other option. Like this: ( ) Option 1 (o) Option 2 ( ) Option 3 ( ) Other: [ I prefer this option because... ] The problem is: In that example, the user has filled in the text input on the Other option, but the selected radio is still the Option 2 So, when the user focus/clicks directly on the text input field, the corresponding radio button (Other) isn't selected. Then, he submits the poll, but because he didn't choose the Other option, he really didn't submit the option he thought he has chosen. The desired behavior (selecting the Other radio button when focusing on the text input field) will probably be easily achievable with some JS, right? But here I am, asking to this list if you know a better approach to this issue. Thanks. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] accessibility/usability in a poll: check a radio button when focusing on a text input field
If you didn't want to use JS at all - you could put some basic logic in the action script that processes the form. If the user wrote something in the other option, then it is pretty simple to simply change the radiobutton values accordingly before doing final processing (like emailing to the admin). JS should always be an enhancement :) Cheers Adam On Fri, May 23, 2008 at 2:57 PM, Julián Landerreche [EMAIL PROTECTED] wrote: Hi. Probably this can't be done without (unobstrusive) Javascript. In simple polls, sometimes there is an Other option that is also provided with a text input so visitors can give some feedback on this other option. Like this: ( ) Option 1 (o) Option 2 ( ) Option 3 ( ) Other: [ I prefer this option because... ] The problem is: In that example, the user has filled in the text input on the Other option, but the selected radio is still the Option 2 So, when the user focus/clicks directly on the text input field, the corresponding radio button (Other) isn't selected. Then, he submits the poll, but because he didn't choose the Other option, he really didn't submit the option he thought he has chosen. The desired behavior (selecting the Other radio button when focusing on the text input field) will probably be easily achievable with some JS, right? But here I am, asking to this list if you know a better approach to this issue. Thanks. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- - http://myfitness.ning.com A community of people that care about their health and fitness Free fitness videos, recipes, blogs, photos etc. -- *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***