Closed Bug 218788 Opened 21 years ago Closed 19 years ago

evisaforms.state.gov - invalid HTML breaks form radio button

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
All
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: swillison, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1

If a page contains two radio boxes with the same ID attribute applied to each
one, only the first can be selected.

Reproducible: Always

Steps to Reproduce:
1. Load the US Immigration form linked above
2. Locate part 35, "Has Your Visa Ever Been Cancelled or Revoked?"
3. Click on the "No" radio box

Actual Results:  
The No option is selected while the mouse button is held down, but the moment
the mouse button is released the Yes option is reselected.

Expected Results:  
The No option should have been permanently selected.
-> Form Controls
Assignee: form-submission → form
Status: UNCONFIRMED → NEW
Component: Form Submission → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
QA Contact: ashishbhatt → ian
Attached file Testcase
There are two separate problems here.  One is caused by a missing </label>
making the mouse clicks on the controls bubble into the <label>, this is a
duplicate of bug 213519.  The other part is that it looks like both alternatives
are selected after you click "Yes" then "No".  This is what the Testcase shows
(I have added the missing </label>).
Um... The document is invalid HTML, since IDs MUST be unique...
->TE for the site that exhibits this problem.
Assignee: form → english-us
Component: Layout: Form Controls → English US
Priority: -- → P4
Product: Browser → Tech Evangelism
QA Contact: ian → english-us
Summary: radio box with duplicate ID is unselectable → evisaforms.state.gov - invalid HTML breaks form radio button
Version: Trunk → unspecified
*** Bug 237639 has been marked as a duplicate of this bug. ***
*** Bug 247202 has been marked as a duplicate of this bug. ***
*** Bug 252105 has been marked as a duplicate of this bug. ***
*** Bug 248785 has been marked as a duplicate of this bug. ***
Bumping severity up a notch: dups keep coming in and this is a .gov site.
It ought to work - also with Mozilla.

Why is this P4?
Severity: normal → major
Priority: P4 → --
*** Bug 254322 has been marked as a duplicate of this bug. ***
*** Bug 261864 has been marked as a duplicate of this bug. ***
*** Bug 277088 has been marked as a duplicate of this bug. ***
Contacted US State Department use [ref#555125] when contacting them about this bug.
Submitted the following @
http://contact-us.state.gov/ask_form_cat/ask_form_suggest.html.

e-Form DS-156 US Department of State Nonimmigrant Visa Application
URL https://evisaforms.state.gov/ds156.asp?lang=1

Problem:
It is impossible to choose no on question 35 using Netscape 7.x/Mozilla
1.x/Firefox 1.0. All other yes/no radio buttons operate normally.

Current code for question 35 that does not work.
<label for="f35">35. Has Your U.S. Visa Ever Been Cancelled or Revoked? <input
tabindex="83" name="fvisarevoked" value="Yes" id="f35" type="radio"> Yes <input
tabindex="83" name="fvisarevoked" value="No" id="f35" type="radio"> No</label>

Current code for question 30 that does work.
<label for="f30">30. Have You Ever Been Issued a U.S. Visa?</label> <input
tabindex="66" name="fvisaissuance" value="Yes" id="f30" type="radio"> Yes <input
tabindex="66" name="fvisaissuance" value="No" id="f30" type="radio"> No

Comparing the two questions shows that the </label> tag is in the wrong spot.

Solution:
Revised code for question 35 to make it have the same format as question 30.
<label for="f35">35. Has Your U.S. Visa Ever Been Cancelled or Revoked?</label>
<input tabindex="83" name="fvisarevoked" value="Yes" id="f35" type="radio"> Yes
<input tabindex="83" name="fvisarevoked" value="No" id="f35" type="radio"> No
(In reply to comment #14)

I'm pretty sure that it's not valid to have multiple components with ids of the
same value, is it?

Changing the IDs to be unique, fixes the problem without moving the closing
</label> tag. It seems to be only when a label tries to enclose two things that
both have the id that it's "for", that it has problems.
*** Bug 282556 has been marked as a duplicate of this bug. ***
Depends on: 229925
Your government dollars at work.
Question 35 now works

They have revised the question in page to 
<label for="f35">35. Has Your U.S. Visa Ever Been Cancelled or Revoked?</label>
<input tabindex="83" name="fvisarevoked" value="Yes" id="f35" type="radio"> Yes
<input tabindex="83" name="fvisarevoked" value="No" id="f35" type="radio"> No
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: