| <html> |
| <script> |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| </script> |
| <body> |
| |
| <div id="result"></div> |
| |
| <!-- Test radio group without a form--> |
| <form> |
| <input type="radio" id="test1" name="test1">Yes<BR> |
| <input type="radio" id="test1" name="test1">No<BR> |
| <input type="radio" id="test1" name="test1">Maybe<BR> |
| </form> |
| <br><br> |
| |
| <!-- Test radio group without a form --> |
| <input type="radio" id="test2" name="test2">Yes<BR> |
| <input type="radio" id="test2" name="test2">No<BR> |
| <br><br> |
| |
| <!-- Test radio group with labels --> |
| <form> |
| <input type="radio" id="test3" name="test3"><label for="test3">Yes</label><BR> |
| <input type="radio" id="test3_1" name="test3"><label for="test3_1">No</label><BR> |
| </form> |
| <br><br> |
| |
| <!-- Test different radio groups --> |
| <form> |
| <input type="radio" id="test4" name="test4">Yes<BR> |
| <input type="radio" id="test5" name="test5">No<BR> |
| </form> |
| <br><br> |
| |
| <script> |
| if (window.accessibilityController) { |
| var result = document.getElementById("result"); |
| |
| var labeledItem = document.getElementById("test1"); |
| labeledItem.focus(); |
| result.innerText += "Radio group in a form\n"; |
| result.innerText += "----------------------\n"; |
| result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| |
| result.innerText += "Radio group without a form\n"; |
| result.innerText += "----------------------\n"; |
| labeledItem = document.getElementById("test2"); |
| labeledItem.focus(); |
| result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| |
| result.innerText += "Radio group with labels\n"; |
| result.innerText += "----------------------\n"; |
| labeledItem = document.getElementById("test3"); |
| labeledItem.focus(); |
| result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| |
| result.innerText += "Radio button without a group\n"; |
| result.innerText += "----------------------\n"; |
| labeledItem = document.getElementById("test4"); |
| labeledItem.focus(); |
| result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| } |
| </script> |
| </body> |
| </html> |