Bug 36551

Summary: Radio buttons with empty names should form a group, too
Product: WebKit Reporter: Steven Jay Cohen <steven.jay.cohen>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ap, cmarcelo, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
movie of error none

Steven Jay Cohen
Reported 2010-03-24 12:52:12 PDT
Created attachment 51536 [details] movie of error The following code allows Safari to select both radio buttons (when it should only be allowed to select one. Non-webkit browsers (notably Firefox) handle this code with the expected behavior: <html> <body> <form> <input type="radio" name="" value="male" /> Male <br /> <input type="radio" name="" value="female" /> Female </form> </body> </html>
Attachments
movie of error (1.69 MB, video/quicktime)
2010-03-24 12:52 PDT, Steven Jay Cohen
no flags
Alexey Proskuryakov
Comment 1 2010-03-24 17:12:30 PDT
Confirmed as a difference with Firefox. We should also check what IE does, and what HTML5 says.
Kent Tamura
Comment 2 2011-12-21 01:20:49 PST
HTML5 says > They both have a name attribute, their name attributes are not empty, and the value of a's name attribute is a compatibility caseless match for the value of b's name attribute. http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#radio-button-state-(type=radio) IE also doesn't make a group for empty name. We have no reason to change the current behavior.
Note You need to log in before you can comment on or make changes to this bug.