1 Test that label.control references the correct form control, or null if there is no associated control. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 Find a control that is the first descendent in a label 7 PASS document.getElementById('test1').control.id is 'inputId1' 8 Find a control based on a label with valid 'for' attribute 9 PASS document.getElementById('test2').htmlFor is 'inputId2' 10 PASS document.getElementById('test2').control.type is 'number' 11 Find a control in p element in label 12 PASS document.getElementById('test3').control.id is 'inputId3' 13 Find a control in fieldset in label. 14 Note that filedset is a form control that is not labelable. 15 PASS document.getElementById('test4').control.id is 'inputId4' 16 Find a control in legend in label. 17 Note that legend is a form control that is not labelable. 18 PASS document.getElementById('test5').control.id is 'inputId5' 19 Find a control in optgroup in label. 20 Note that optgroup is a form control that is not labelable. 21 PASS document.getElementById('test6').control.id is 'inputId6' 22 Find a control in option in label. 23 Note that option is a form control that is not labelable. 24 PASS document.getElementById('test7').control.id is 'inputId7' 25 Test label with 'for' attribute which is not a valid element id 26 PASS document.getElementById('test8').control is null 27 Test label with 'for' attribute which is not a form control 28 PASS document.getElementById('test9').htmlFor is 'divId' 29 PASS document.getElementById('test9').control is null 30 Test label with 'for' attribute which is not a labelable form control - fieldset 31 PASS document.getElementById('test10').htmlFor is 'fsId' 32 PASS document.getElementById('test10').control is null 33 Test label with 'for' attribute which is not a labelable form control - legend 34 PASS document.getElementById('test11').htmlFor is 'legendId' 35 PASS document.getElementById('test11').control is null 36 Test label with 'for' attribute which is not a labelable form control - optgroup 37 PASS document.getElementById('test12').htmlFor is 'optgroupId' 38 PASS document.getElementById('test12').control is null 39 Test label with 'for' attribute which is not a labelable form control - option 40 PASS document.getElementById('test13').htmlFor is 'optionId' 41 PASS document.getElementById('test13').control is null 42 PASS successfullyParsed is true 43 44 TEST COMPLETE 45 46 47 48 49 50 51 52