Input fields between label tags have erroneus behaviour

RESOLVED DUPLICATE of bug 229925

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 229925
11 years ago
11 years ago

People

(Reporter: Valentín, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

The focus returns to the first field in the form when you select the third or the fourth input box. Tested a correct behaviour without label tags.

Sample code on error:

<form name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
	<label>Nombre
	<input name="nombre" type="text" id="nombre">
	apellidos
	<input name="apellidos" type="text" id="apellidos">
	edad
	<input name="edad" type="text" id="edad" size="2" >
	Fecha de nacimiento
	<input name="nacimiento" type="text" value="dd/mm/aaa" size="15" maxlength="8">
	<br>
	
	Sexo	
	varon
	<input name="sexo" type="radio" value="v">
	mujer
	<input name="sexo" type="radio" value="h">
	<br>
	<br>
	<br>
	<input type="submit" name="Submit" value="Enviar">
	</label>
	</form>

Reproducible: Always

Steps to Reproduce:
1.Copy & paste code in report
2.click EDAD input 
3.
Actual Results:  
Focus go to first input field

Expected Results:  
Focus has to remain in EDAD input.

Comment 1

11 years ago
label tags are meant to be explicitly associated with each input on a form, not the whole form. Example at http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 229925
You need to log in before you can comment on or make changes to this bug.