test_aria.xhtml (1992B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" 4 type="text/css"?> 5 6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 7 title="Accessibility Name Calculating Test."> 8 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> 10 11 <script type="application/javascript" 12 src="../common.js"></script> 13 <script type="application/javascript" 14 src="../role.js" /> 15 16 <script type="application/javascript"> 17 <![CDATA[ 18 function doTest() 19 { 20 ok(!isAccessible("presentation_label"), 21 "Presentation label shouldn't be accessible."); 22 ok(!isAccessible("presentation_descr"), 23 "Presentation description shouldn't be accessible."); 24 25 // aria-pressed 26 testRole("pressed_button", ROLE_TOGGLE_BUTTON); 27 28 SimpleTest.finish(); 29 } 30 31 SimpleTest.waitForExplicitFinish(); 32 addA11yLoadEvent(doTest); 33 ]]> 34 </script> 35 36 <hbox flex="1" style="overflow: auto;"> 37 38 <body xmlns="http://www.w3.org/1999/xhtml"> 39 <a target="_blank" 40 href="https://bugzilla.mozilla.org/show_bug.cgi?id=494345" 41 title="Do not create accessibles for XUL label or description having a role of 'presentation'"> 42 Mozilla Bug 494345 43 </a> 44 <a target="_blank" 45 href="https://bugzilla.mozilla.org/show_bug.cgi?id=1033283" 46 title="Expose pressed state on XUL menu toggle buttons"> 47 Mozilla Bug 1033283 48 </a> 49 <p id="display"></p> 50 <div id="content" style="display: none"> 51 </div> 52 <pre id="test"> 53 </pre> 54 </body> 55 56 <vbox flex="1"> 57 <label id="presentation_label" role="presentation" value="label"/> 58 <description id="presentation_descr" role="presentation" value="description"/> 59 <button id="pressed_button" aria-pressed="true" label="I am pressed" /> 60 </vbox> 61 62 63 </hbox> 64 </window>