2008-02-19 05:47:19 -08:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
|
|
|
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
|
|
|
type="text/css"?>
|
|
|
|
|
|
|
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
title="Accessibility Group Attributes ('level', 'setsize', 'posinset') Test.">
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
|
|
|
|
2008-10-28 04:54:57 -07:00
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../common.js" />
|
2008-10-28 04:54:57 -07:00
|
|
|
<script type="application/javascript"
|
2010-09-01 15:09:56 -07:00
|
|
|
src="../attributes.js" />
|
2008-02-19 05:47:19 -08:00
|
|
|
|
2008-10-28 04:54:57 -07:00
|
|
|
<script type="application/javascript">
|
|
|
|
<![CDATA[
|
2008-02-19 05:47:19 -08:00
|
|
|
function doTest()
|
|
|
|
{
|
2008-06-27 23:16:34 -07:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// xul:listbox (bug 417317)
|
2010-01-06 02:36:50 -08:00
|
|
|
testGroupAttrs("item1", 1, 2);
|
|
|
|
testGroupAttrs("item2", 2, 2);
|
2008-02-19 05:47:19 -08:00
|
|
|
|
2008-06-27 23:16:34 -07:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
2008-07-09 08:50:52 -07:00
|
|
|
// xul:menu (bug 443881)
|
2009-01-04 23:41:30 -08:00
|
|
|
var menu1 = document.getElementById("menu_item1");
|
|
|
|
menu1.open = true;
|
|
|
|
|
|
|
|
window.setTimeout(function() {
|
|
|
|
var menu2 = document.getElementById("menu_item2");
|
|
|
|
menu2.open = true;
|
|
|
|
|
|
|
|
window.setTimeout(function() {
|
2010-01-06 02:36:50 -08:00
|
|
|
testGroupAttrs("menu_item1.1", 1, 1);
|
|
|
|
testGroupAttrs("menu_item1.2", 1, 3);
|
|
|
|
testGroupAttrs("menu_item1.4", 2, 3);
|
|
|
|
testGroupAttrs("menu_item2", 3, 3);
|
|
|
|
testGroupAttrs("menu_item2.1", 1, 2, 1);
|
|
|
|
testGroupAttrs("menu_item2.2", 2, 2, 1);
|
2009-01-04 23:41:30 -08:00
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}, 200);
|
|
|
|
}, 200);
|
2008-07-09 08:50:52 -07:00
|
|
|
|
2010-01-06 02:36:50 -08:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// xul:tab
|
|
|
|
testGroupAttrs("tab1", 1, 2);
|
|
|
|
testGroupAttrs("tab2", 2, 2);
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// xul:radio
|
|
|
|
testGroupAttrs("radio1", 1, 2);
|
|
|
|
testGroupAttrs("radio2", 2, 2);
|
|
|
|
|
2008-07-09 08:50:52 -07:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// ARIA menu (bug 441888)
|
2010-01-06 02:36:50 -08:00
|
|
|
testGroupAttrs("aria-menuitem", 1, 3);
|
|
|
|
testGroupAttrs("aria-menuitemcheckbox", 2, 3);
|
|
|
|
testGroupAttrs("aria-menuitemradio", 3, 3);
|
|
|
|
testGroupAttrs("aria-menuitem2", 1, 1);
|
2008-02-19 05:47:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2008-02-19 05:47:19 -08:00
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<body xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=417317"
|
|
|
|
title="Certain types of LISTITEM accessibles no longer get attributes set like 'x of y', regression from fix for bug 389926">
|
|
|
|
Mozilla Bug 417317
|
2008-07-09 08:50:52 -07:00
|
|
|
</a><br/>
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=443881"
|
|
|
|
title="take into account separators in xul menus when group attributes are calculating">
|
|
|
|
Mozilla Bug 443881
|
|
|
|
</a><br/>
|
|
|
|
<a target="_blank"
|
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=441888"
|
|
|
|
title="ARIA checked menu items are not included in the total list of menu items">
|
|
|
|
Mozilla Bug 441888
|
|
|
|
</a><br/>
|
|
|
|
|
2008-02-19 05:47:19 -08:00
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<listbox>
|
|
|
|
<listitem label="item1" id="item1"/>
|
|
|
|
<listitem label="item2" id="item2"/>
|
|
|
|
</listbox>
|
2008-06-27 23:16:34 -07:00
|
|
|
|
2008-07-09 08:50:52 -07:00
|
|
|
<menubar>
|
|
|
|
<menu label="item1" id="menu_item1">
|
|
|
|
<menupopup>
|
|
|
|
<menuitem label="item1.1" id="menu_item1.1"/>
|
|
|
|
<menuseparator/>
|
|
|
|
<menuitem label="item1.2" id="menu_item1.2"/>
|
|
|
|
<menuitem label="item1.3" hidden="true"/>
|
|
|
|
<menuitem label="item1.4" id="menu_item1.4"/>
|
|
|
|
<menu label="item2" id="menu_item2">
|
|
|
|
<menupopup>
|
|
|
|
<menuitem label="item2.1" id="menu_item2.1"/>
|
|
|
|
<menuitem label="item2.2" id="menu_item2.2"/>
|
|
|
|
</menupopup>
|
|
|
|
</menu>
|
|
|
|
</menupopup>
|
|
|
|
</menu>
|
|
|
|
</menubar>
|
|
|
|
|
2010-01-06 02:36:50 -08:00
|
|
|
<tabbox>
|
|
|
|
<tabs>
|
|
|
|
<tab id="tab1" label="tab1"/>
|
|
|
|
<tab id="tab2" label="tab3"/>
|
|
|
|
</tabs>
|
|
|
|
<tabpanels>
|
|
|
|
<tabpanel/>
|
|
|
|
<tabpanel/>
|
|
|
|
</tabpanels>
|
|
|
|
</tabbox>
|
|
|
|
|
|
|
|
<radiogroup>
|
|
|
|
<radio id="radio1" label="radio1"/>
|
|
|
|
<radio id="radio2" label="radio2"/>
|
|
|
|
</radiogroup>
|
|
|
|
|
2008-06-27 23:16:34 -07:00
|
|
|
<vbox>
|
|
|
|
<description role="menuitem" id="aria-menuitem"
|
|
|
|
value="conventional menuitem"/>
|
|
|
|
<description role="menuitemcheckbox" id="aria-menuitemcheckbox"
|
|
|
|
value="conventional checkbox menuitem"/>
|
|
|
|
<description role="menuitem" hidden="true"/>
|
|
|
|
<description role="menuitemradio" id="aria-menuitemradio"
|
|
|
|
value="conventional radio menuitem"/>
|
|
|
|
<description role="separator"
|
|
|
|
value="conventional separator"/>
|
|
|
|
<description role="menuitem" id="aria-menuitem2"
|
|
|
|
value="conventional menuitem"/>
|
|
|
|
</vbox>
|
2008-02-19 05:47:19 -08:00
|
|
|
</window>
|
|
|
|
|