Re: required radio buttons and checkboxes

Olivier GENDRIN wrote:
> On Wed, Apr 23, 2008 at 4:07 PM, Philip Taylor <pjt47@cam.ac.uk> wrote:
>> In a form like <input type=radio name=whatever required><input type=radio
>> name=whatever required>, with more than one required input control, the UA
>> should only give you a single "you need to select one option here" message
>> for the entire radio group which is what the spec paragraph above is talking
>> about.
> 
> What about internationalisation/localisation of these error messages ?
> 

http://www.whatwg.org/specs/web-forms/current-work/#form-validation

"The default action [of 'invalid' events] is UA-specific, but is 
expected to consist of focusing the element (possibly firing focus 
events if appropriate), and alerting the user (ideally using a non-modal 
mechanism such as a help balloon) that the entered value is unacceptable 
in the user's native language along with explanatory text saying why the 
value is currently invalid."

(Rather than "the user's native language", this should probably match 
the browser's UI language. In any case, it's up to the UA to choose good 
text and localise appropriately, since this isn't something that affects 
interoperability.)

For custom scripted validity error conditions, the UA can't determine 
explanatory text itself, so:

"If the reason the control is invalid is an author defined custom error 
then the message that the author provided using the setCustomValidity() 
method should be used."

in which case the author should probably use the same language as the 
rest of their content.

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Wednesday, 23 April 2008 14:53:16 UTC