This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26353 - RadioNodeList.value should return "on" if element's value is undefined
Summary: RadioNodeList.value should return "on" if element's value is undefined
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 07:06 UTC by Dirkjan Ochtman
Modified: 2014-09-06 21:02 UTC (History)
4 users (show)

See Also:


Attachments

Description Dirkjan Ochtman 2014-07-16 07:06:14 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist

In step 2 of the specification for getting the "value" attribute, the spec says:

If element is null, or if it is an element with no value attribute, return the empty string.

However, as specified in section 4.10.5 (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html), input elements of type radio have value mode "default/on", such that their .value is supposed to be "on" if undefined (http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on). As such, it would make sense to add separate steps 2a and 2b (or whatever):

2a. If element is null, return the empty string.
2b. If the element has no value attribute, return "on".

Indeed, some of the tests at https://github.com/w3c/web-platform-tests/blob/master/html/infrastructure/common-dom-interfaces/collections/radionodelist.html currently fail on Chrome (and in my proposed Gecko patch, for https://bugzilla.mozilla.org/show_bug.cgi?id=779723) due to this issue. I submitted a pull request for the test: https://github.com/w3c/web-platform-tests/pull/1108.
Comment 1 Ian 'Hixie' Hickson 2014-07-16 19:51:52 UTC
Seems reasonable.
Comment 2 Ms2ger 2014-07-17 09:57:48 UTC
21:15	djc	Hixie: so, for https://www.w3.org/Bugs/Public/show_bug.cgi?id=26353, what's next?
21:15	Hixie	i fix the bug
21:16	Hixie	might take a while, i'm rebuilding my publication pipeline and have quite a baclog
21:16	Hixie	backlog
21:16	Hixie	but you can assume the spec will be adjusted accordingly
Comment 3 Ms2ger 2014-07-17 16:42:08 UTC
There's a link to the bug in the test: <https://github.com/w3c/web-platform-tests/commit/9f8243aebe785e2c2ddce1ca6a2cd1d36b29bf6f>. Please poke me when you fix the bug so I can remove it.
Comment 4 Ian 'Hixie' Hickson 2014-09-04 21:30:51 UTC
I also fixed the setter to do the corresponding magic.
Comment 5 contributor 2014-09-04 21:31:15 UTC
Checked in as WHATWG revision r8744.
Check-in comment: Make RadioNodeList's radio button logic support the magical 'on' value.
http://html5.org/tools/web-apps-tracker?from=8743&to=8744
Comment 6 Ms2ger 2014-09-06 21:02:56 UTC
Thanks:

https://github.com/w3c/web-platform-tests/pull/1231