W3C home > Mailing lists > Public > public-html@w3.org > April 2008

Re: required radio buttons and checkboxes

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 23 Apr 2008 15:52:27 +0100
Message-ID: <480F4D2B.1050508@cam.ac.uk>
To: Olivier GENDRIN <olivier.gendrin@gmail.com>
CC: HTML WG <public-html@w3.org>

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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:54 UTC