accessible/tests/mochitest/test_aria_token_attrs.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/tests/mochitest/test_aria_token_attrs.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,329 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=452388
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>An NMTOKEN based ARIA property is undefined if the ARIA attribute is not present, or is set to "" or "undefined"</title>
    1.11 +  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
    1.12 +
    1.13 +  <script type="application/javascript"
    1.14 +          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    1.15 +
    1.16 +  <script type="application/javascript"
    1.17 +          src="common.js"></script>
    1.18 +  <script type="application/javascript"
    1.19 +          src="role.js"></script>
    1.20 +  <script type="application/javascript"
    1.21 +      src="states.js"></script>
    1.22 +
    1.23 +  <script type="application/javascript">
    1.24 +    function doTest()
    1.25 +    {
    1.26 +      // test aria-pressed state mapping to roles PUSHBUTTON vs TOGGLEBUTTON
    1.27 +      testRole("button_pressed_true", ROLE_TOGGLE_BUTTON);
    1.28 +      testRole("button_pressed_false", ROLE_TOGGLE_BUTTON);
    1.29 +      testRole("button_pressed_empty", ROLE_PUSHBUTTON);
    1.30 +      testRole("button_pressed_undefined", ROLE_PUSHBUTTON);
    1.31 +      testRole("button_pressed_absent", ROLE_PUSHBUTTON);
    1.32 +
    1.33 +      // test button aria-pressed states
    1.34 +      testStates("button_pressed_true", STATE_PRESSED, 0, STATE_CHECKABLE);
    1.35 +      testStates("button_pressed_false", 0, 0, STATE_CHECKABLE | STATE_PRESSED);
    1.36 +      testStates("button_pressed_empty", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
    1.37 +      testStates("button_pressed_undefined", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
    1.38 +      testStates("button_pressed_absent", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
    1.39 +
    1.40 +      // test (checkbox) checkable and checked states
    1.41 +      testStates("checkbox_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
    1.42 +      testStates("checkbox_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.43 +      testStates("checkbox_checked_empty", STATE_CHECKABLE , 0, STATE_CHECKED);
    1.44 +      testStates("checkbox_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.45 +      testStates("checkbox_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.46 +
    1.47 +      // test native checkbox checked state and aria-checked state (if conflict, native wins)
    1.48 +      testStates("native_checkbox_nativechecked_ariatrue", (STATE_CHECKABLE | STATE_CHECKED));
    1.49 +      testStates("native_checkbox_nativechecked_ariafalse", (STATE_CHECKABLE | STATE_CHECKED));
    1.50 +      testStates("native_checkbox_nativechecked_ariaempty", (STATE_CHECKABLE | STATE_CHECKED));
    1.51 +      testStates("native_checkbox_nativechecked_ariaundefined", (STATE_CHECKABLE | STATE_CHECKED));
    1.52 +      testStates("native_checkbox_nativechecked_ariaabsent", (STATE_CHECKABLE | STATE_CHECKED));
    1.53 +
    1.54 +      testStates("native_checkbox_nativeunchecked_ariatrue", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.55 +      testStates("native_checkbox_nativeunchecked_ariafalse", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.56 +      testStates("native_checkbox_nativeunchecked_ariaempty", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.57 +      testStates("native_checkbox_nativeunchecked_ariaundefined", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.58 +      testStates("native_checkbox_nativeunchecked_ariaabsent", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.59 +
    1.60 +      // test (checkbox) readonly states
    1.61 +      testStates("checkbox_readonly_true", STATE_READONLY);
    1.62 +      testStates("checkbox_readonly_false", 0, 0, STATE_READONLY);
    1.63 +      testStates("checkbox_readonly_empty", 0, 0, STATE_READONLY);
    1.64 +      testStates("checkbox_readonly_undefined", 0, 0, STATE_READONLY);
    1.65 +      testStates("checkbox_readonly_absent", 0, 0, STATE_READONLY);
    1.66 +
    1.67 +      // test (checkbox) required states
    1.68 +      testStates("checkbox_required_true", STATE_REQUIRED);
    1.69 +      testStates("checkbox_required_false", 0, 0, STATE_REQUIRED);
    1.70 +      testStates("checkbox_required_empty", 0, 0, STATE_REQUIRED);
    1.71 +      testStates("checkbox_required_undefined", 0, 0, STATE_REQUIRED);
    1.72 +      testStates("checkbox_required_absent", 0, 0, STATE_REQUIRED);
    1.73 +
    1.74 +      // test (checkbox) invalid states
    1.75 +      testStates("checkbox_invalid_true", STATE_INVALID);
    1.76 +      testStates("checkbox_invalid_false", 0, 0, STATE_INVALID);
    1.77 +      testStates("checkbox_invalid_empty", 0, 0, STATE_INVALID);
    1.78 +      testStates("checkbox_invalid_undefined", 0, 0, STATE_INVALID);
    1.79 +      testStates("checkbox_invalid_absent", 0, 0, STATE_INVALID);
    1.80 +
    1.81 +      // test (checkbox) disabled states
    1.82 +      testStates("checkbox_disabled_true", STATE_UNAVAILABLE);
    1.83 +      testStates("checkbox_disabled_false", 0, 0, STATE_UNAVAILABLE);
    1.84 +      testStates("checkbox_disabled_empty", 0, 0, STATE_UNAVAILABLE);
    1.85 +      testStates("checkbox_disabled_undefined", 0, 0, STATE_UNAVAILABLE);
    1.86 +      testStates("checkbox_disabled_absent", 0, 0, STATE_UNAVAILABLE);
    1.87 +
    1.88 +      // test (listbox) multiselectable states
    1.89 +      testStates("listbox_multiselectable_true", STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
    1.90 +      testStates("listbox_multiselectable_false", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
    1.91 +      testStates("listbox_multiselectable_empty", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
    1.92 +      testStates("listbox_multiselectable_undefined", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
    1.93 +      testStates("listbox_multiselectable_absent", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
    1.94 +
    1.95 +      // test (option) checkable and checked states
    1.96 +      testStates("option_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
    1.97 +      testStates("option_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
    1.98 +      testStates("option_checked_empty", 0 , 0, STATE_CHECKABLE | STATE_CHECKED);
    1.99 +      testStates("option_checked_undefined", 0, 0, STATE_CHECKABLE | STATE_CHECKED);
   1.100 +      testStates("option_checked_absent", 0, 0, STATE_CHECKABLE | STATE_CHECKED);
   1.101 +
   1.102 +      // test (menuitem) checkable and checked states
   1.103 +      testStates("menuitem_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
   1.104 +      testStates("menuitem_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.105 +      testStates("menuitem_checked_empty", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
   1.106 +      testStates("menuitem_checked_undefined", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
   1.107 +      testStates("menuitem_checked_absent", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
   1.108 +
   1.109 +      // test (menuitemradio) checkable and checked states
   1.110 +      testStates("menuitemradio_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
   1.111 +      testStates("menuitemradio_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.112 +      testStates("menuitemradio_checked_empty", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.113 +      testStates("menuitemradio_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.114 +      testStates("menuitemradio_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.115 +
   1.116 +      // test (radio) checkable and checked states
   1.117 +      testStates("radio_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
   1.118 +      testStates("radio_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.119 +      testStates("radio_checked_empty", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.120 +      testStates("radio_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.121 +      testStates("radio_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
   1.122 +
   1.123 +      // test (textbox) multiline states
   1.124 +      testStates("textbox_multiline_true", 0, EXT_STATE_MULTI_LINE);
   1.125 +      testStates("textbox_multiline_false", 0, EXT_STATE_SINGLE_LINE);
   1.126 +      testStates("textbox_multiline_empty", 0, EXT_STATE_SINGLE_LINE);
   1.127 +      testStates("textbox_multiline_undefined", 0, EXT_STATE_SINGLE_LINE);
   1.128 +      testStates("textbox_multiline_absent", 0, EXT_STATE_SINGLE_LINE);
   1.129 +
   1.130 +      // test (textbox) readonly states
   1.131 +      testStates("textbox_readonly_true", STATE_READONLY);
   1.132 +      testStates("textbox_readonly_false", 0, EXT_STATE_EDITABLE, STATE_READONLY);
   1.133 +      testStates("textbox_readonly_empty", 0, EXT_STATE_EDITABLE, STATE_READONLY);
   1.134 +      testStates("textbox_readonly_undefined", 0, EXT_STATE_EDITABLE, STATE_READONLY);
   1.135 +      testStates("textbox_readonly_absent", 0, EXT_STATE_EDITABLE, STATE_READONLY);
   1.136 +
   1.137 +      // test native textbox readonly state and aria-readonly state (if conflict, native wins)
   1.138 +      testStates("native_textbox_nativereadonly_ariatrue", STATE_READONLY);
   1.139 +      testStates("native_textbox_nativereadonly_ariafalse", STATE_READONLY);
   1.140 +      testStates("native_textbox_nativereadonly_ariaempty", STATE_READONLY);
   1.141 +      testStates("native_textbox_nativereadonly_ariaundefined", STATE_READONLY);
   1.142 +      testStates("native_textbox_nativereadonly_ariaabsent", STATE_READONLY);
   1.143 +
   1.144 +      testStates("native_textbox_nativeeditable_ariatrue", 0, 0, STATE_READONLY);
   1.145 +      testStates("native_textbox_nativeeditable_ariafalse", 0, 0, STATE_READONLY);
   1.146 +      testStates("native_textbox_nativeeditable_ariaempty", 0, 0, STATE_READONLY);
   1.147 +      testStates("native_textbox_nativeeditable_ariaundefined", 0, 0, STATE_READONLY);
   1.148 +      testStates("native_textbox_nativeeditable_ariaabsent", 0, 0, STATE_READONLY);
   1.149 +
   1.150 +      // test (treeitem) selectable and selected states
   1.151 +      testStates("treeitem_selected_true", (STATE_SELECTABLE | STATE_SELECTED));
   1.152 +      testStates("treeitem_selected_false", STATE_SELECTABLE, 0, STATE_SELECTED);
   1.153 +      testStates("treeitem_selected_empty", STATE_SELECTABLE, 0, STATE_SELECTED);
   1.154 +      testStates("treeitem_selected_undefined", STATE_SELECTABLE, 0, STATE_SELECTED);
   1.155 +      testStates("treeitem_selected_absent", STATE_SELECTABLE, 0, STATE_SELECTED);
   1.156 +
   1.157 +      // test (treeitem) haspopup states
   1.158 +      testStates("treeitem_haspopup_true", STATE_HASPOPUP);
   1.159 +      testStates("treeitem_haspopup_false", 0, 0, STATE_HASPOPUP);
   1.160 +      testStates("treeitem_haspopup_empty", 0, 0, STATE_HASPOPUP);
   1.161 +      testStates("treeitem_haspopup_undefined", 0, 0, STATE_HASPOPUP);
   1.162 +      testStates("treeitem_haspopup_absent", 0, 0, STATE_HASPOPUP);
   1.163 +
   1.164 +      // test (treeitem) expandable and expanded/collapsed states
   1.165 +      testStates("treeitem_expanded_true", STATE_EXPANDED, EXT_STATE_EXPANDABLE);
   1.166 +      testStates("treeitem_expanded_false", STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
   1.167 +      testStates("treeitem_expanded_empty", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
   1.168 +      testStates("treeitem_expanded_undefined", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
   1.169 +      testStates("treeitem_expanded_absent", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
   1.170 +
   1.171 +      SimpleTest.finish();
   1.172 +    }
   1.173 +
   1.174 +    SimpleTest.waitForExplicitFinish();
   1.175 +    addA11yLoadEvent(doTest);
   1.176 +  </script>
   1.177 +</head>
   1.178 +<body>
   1.179 +
   1.180 +  <a target="_blank"
   1.181 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=452388">
   1.182 +    Mozilla Bug 452388
   1.183 +  </a>
   1.184 +  <a target="_blank"
   1.185 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=499653"
   1.186 +     title="Unify ARIA state attributes mapping rules">
   1.187 +    Mozilla Bug 499653
   1.188 +  </a>
   1.189 +  <a target="_blank"
   1.190 +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=989958"
   1.191 +     title="Pressed state is not exposed on a button element with aria-pressed attribute"
   1.192 +    Mozilla Bug 989958
   1.193 +  </a>
   1.194 +  <p id="display"></p>
   1.195 +  <div id="content" style="display: none"></div>
   1.196 +  <pre id="test">
   1.197 +  </pre>
   1.198 +
   1.199 +  <div id="button_pressed_true" role="button" aria-pressed="true">This button has aria-pressed="true" and should get ROLE_TOGGLE_BUTTON. It should also get STATE_PRESSED.</div>
   1.200 +  <div id="button_pressed_false" role="button" aria-pressed="false">This button has aria-pressed="false" and should get ROLE_TOGGLE_BUTTON.</div>
   1.201 +  <div id="button_pressed_empty" role="button" aria-pressed="">This button has aria-pressed="" and should <emph>not</emph> get ROLE_BUTTON.</div>
   1.202 +  <div id="button_pressed_undefined" role="button" aria-pressed="undefined">This button has aria-pressed="undefined" and should <emph>not</emph> get ROLE_TOGGLE_BUTTON.</div>
   1.203 +  <div id="button_pressed_absent" role="button">This button has <emph>no</emph> aria-pressed attribute and should <emph>not</emph> get ROLE_TOGGLE_BUTTON.</div>
   1.204 +
   1.205 +  <div id="checkbox_checked_true" role="checkbox" aria-checked="true">This checkbox has aria-checked="true" and should get STATE_CHECKABLE. It should also get STATE_checked.</div>
   1.206 +  <div id="checkbox_checked_false" role="checkbox" aria-checked="false">This checkbox has aria-checked="false" and should get STATE_CHECKABLE.</div>
   1.207 +  <div id="checkbox_checked_empty" role="checkbox" aria-checked="">This checkbox has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.208 +  <div id="checkbox_checked_undefined" role="checkbox" aria-checked="undefined">This checkbox has aria-checked="undefined" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.209 +  <div id="checkbox_checked_absent" role="checkbox">This checkbox has <emph>no</emph> aria-checked attribute and should get STATE_CHECKABLE.</div>
   1.210 +
   1.211 +  <form action="">
   1.212 +    <input id="native_checkbox_nativechecked_ariatrue" type="checkbox" checked="checked" aria-checked="true"/>
   1.213 +    <input id="native_checkbox_nativechecked_ariafalse" type="checkbox" checked="checked" aria-checked="false"/>
   1.214 +    <input id="native_checkbox_nativechecked_ariaempty" type="checkbox" checked="checked" aria-checked=""/>
   1.215 +    <input id="native_checkbox_nativechecked_ariaundefined" type="checkbox" checked="checked" aria-checked="undefined"/>
   1.216 +    <input id="native_checkbox_nativechecked_ariaabsent" type="checkbox" checked="checked"/>
   1.217 +
   1.218 +    <input id="native_checkbox_nativeunchecked_ariatrue" type="checkbox" aria-checked="true"/>
   1.219 +    <input id="native_checkbox_nativeunchecked_ariafalse" type="checkbox" aria-checked="false"/>
   1.220 +    <input id="native_checkbox_nativeunchecked_ariaempty" type="checkbox" aria-checked=""/>
   1.221 +    <input id="native_checkbox_nativeunchecked_ariaundefined" type="checkbox" aria-checked="undefined"/>
   1.222 +    <input id="native_checkbox_nativeunchecked_ariaabsent" type="checkbox"/>
   1.223 +  </form>
   1.224 +
   1.225 +  <div id="checkbox_readonly_true" role="checkbox" aria-readonly="true">This checkbox has aria-readonly="true" and should get STATE_READONLY.</div>
   1.226 +  <div id="checkbox_readonly_false" role="checkbox" aria-readonly="false">This checkbox has aria-readonly="false" and should <emph>not</emph> get STATE_READONLY.</div>
   1.227 +  <div id="checkbox_readonly_empty" role="checkbox" aria-readonly="">This checkbox has aria-readonly="" and should <emph>not</emph> get STATE_READONLY.</div>
   1.228 +  <div id="checkbox_readonly_undefined" role="checkbox" aria-readonly="undefined">This checkbox has aria-readonly="undefined" and should <emph>not</emph> get STATE_READONLY.</div>
   1.229 +  <div id="checkbox_readonly_absent" role="checkbox">This checkbox has <emph>no</emph> aria-readonly attribute and should <emph>not</emph> get STATE_READONLY.</div>
   1.230 +
   1.231 +  <div id="checkbox_required_true" role="checkbox" aria-required="true">This checkbox has aria-required="true" and should get STATE_REQUIRED.</div>
   1.232 +  <div id="checkbox_required_false" role="checkbox" aria-required="false">This checkbox has aria-required="false" and should <emph>not</emph> get STATE_REQUIRED.</div>
   1.233 +  <div id="checkbox_required_empty" role="checkbox" aria-required="">This checkbox has aria-required="" and should <emph>not</emph> get STATE_REQUIRED.</div>
   1.234 +  <div id="checkbox_required_undefined" role="checkbox" aria-required="undefined">This checkbox has aria-required="undefined" and should <emph>not</emph> get STATE_REQUIRED.</div>
   1.235 +  <div id="checkbox_required_absent" role="checkbox">This checkbox has <emph>no</emph> aria-required attribute and should <emph>not</emph> get STATE_REQUIRED.</div>
   1.236 +
   1.237 +  <div id="checkbox_invalid_true" role="checkbox" aria-invalid="true">This checkbox has aria-invalid="true" and should get STATE_INVALID.</div>
   1.238 +  <div id="checkbox_invalid_false" role="checkbox" aria-invalid="false">This checkbox has aria-invalid="false" and should <emph>not</emph> get STATE_INVALID.</div>
   1.239 +  <div id="checkbox_invalid_empty" role="checkbox" aria-invalid="">This checkbox has aria-invalid="" and should <emph>not</emph> get STATE_INVALID.</div>
   1.240 +  <div id="checkbox_invalid_undefined" role="checkbox" aria-invalid="undefined">This checkbox has aria-invalid="undefined" and should <emph>not</emph> get STATE_INVALID.</div>
   1.241 +  <div id="checkbox_invalid_absent" role="checkbox">This checkbox has <emph>no</emph> aria-invalid attribute and should <emph>not</emph> get STATE_INVALID.</div>
   1.242 +
   1.243 +  <div id="checkbox_disabled_true" role="checkbox" aria-disabled="true" tabindex="0">This checkbox has aria-disabled="true" and should get STATE_DISABLED.</div>
   1.244 +  <div id="checkbox_disabled_false" role="checkbox" aria-disabled="false">This checkbox has aria-disabled="false" and should <emph>not</emph> get STATE_DISABLED.</div>
   1.245 +  <div id="checkbox_disabled_empty" role="checkbox" aria-disabled="">This checkbox has aria-disabled="" and should <emph>not</emph> get STATE_DISABLED.</div>
   1.246 +  <div id="checkbox_disabled_undefined" role="checkbox" aria-disabled="undefined">This checkbox has aria-disabled="undefined" and should <emph>not</emph> get STATE_DISABLED.</div>
   1.247 +  <div id="checkbox_disabled_absent" role="checkbox">This checkbox has <emph>no</emph> aria-disabled attribute and should <emph>not</emph> get STATE_DISABLED.</div>
   1.248 +
   1.249 +  <div id="listbox_multiselectable_true" role="listbox" aria-multiselectable="true">
   1.250 +    <div id="option_checked_true" role="option" aria-checked="true">item</div>
   1.251 +  </div>
   1.252 +  <div id="listbox_multiselectable_false" role="listbox" aria-multiselectable="false">
   1.253 +    <div id="option_checked_false" role="option" aria-checked="false">item</div>
   1.254 +  </div>
   1.255 +  <div id="listbox_multiselectable_empty" role="listbox" aria-multiselectable="">
   1.256 +    <div id="option_checked_empty" role="option" aria-checked="">item</div>
   1.257 +  </div>
   1.258 +  <div id="listbox_multiselectable_undefined" role="listbox" aria-multiselectable="undefined">
   1.259 +    <div id="option_checked_undefined" role="option" aria-checked="undefined">item</div>
   1.260 +  </div>
   1.261 +  <div id="listbox_multiselectable_absent" role="listbox">
   1.262 +    <div id="option_checked_absent" role="option">item</div>
   1.263 +  </div>
   1.264 +
   1.265 +  <div role="menu">
   1.266 +    <div id="menuitem_checked_true" role="menuitem" aria-checked="true">This menuitem has aria-checked="true" and should get STATE_CHECKABLE. It should also get STATE_checked.</div>
   1.267 +    <div id="menuitem_checked_false" role="menuitem" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
   1.268 +    <div id="menuitem_checked_empty" role="menuitem" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.269 +    <div id="menuitem_checked_undefined" role="menuitem" aria-checked="undefined">This menuitem has aria-checked="undefined" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.270 +    <div id="menuitem_checked_absent" role="menuitem">This menuitem has <emph>no</emph> aria-checked attribute and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.271 +
   1.272 +    <div id="menuitemradio_checked_true" role="menuitemradio" aria-checked="true">This menuitem has aria-checked="true" and should get STATE_CHECKABLE. It should also get STATE_checked.</div>
   1.273 +    <div id="menuitemradio_checked_false" role="menuitemradio" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
   1.274 +    <div id="menuitemradio_checked_empty" role="menuitemradio" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.275 +    <div id="menuitemradio_checked_undefined" role="menuitemradio" aria-checked="undefined">This menuitem has aria-checked="undefined" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.276 +    <div id="menuitemradio_checked_absent" role="menuitemradio">This menuitem has <emph>no</emph> aria-checked attribute but should get STATE_CHECKABLE.</div>
   1.277 +  </div>
   1.278 +
   1.279 +  <div id="radio_checked_true" role="radio" aria-checked="true">This menuitem has aria-checked="true" and should get STATE_CHECKABLE. It should also get STATE_CHECKED.</div>
   1.280 +  <div id="radio_checked_false" role="radio" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
   1.281 +  <div id="radio_checked_empty" role="radio" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.282 +  <div id="radio_checked_undefined" role="radio" aria-checked="undefined">This menuitem has aria-checked="undefined" and should <emph>not</emph> get STATE_CHECKABLE.</div>
   1.283 +  <div id="radio_checked_absent" role="radio">This menuitem has <emph>no</emph> aria-checked attribute but should get STATE_CHECKABLE.</div>
   1.284 +
   1.285 +  <div id="textbox_readonly_true" role="textbox" aria-readonly="true"></div>
   1.286 +  <div id="textbox_readonly_false" role="textbox" aria-readonly="false"></div>
   1.287 +  <div id="textbox_readonly_empty" role="textbox" aria-readonly=""></div>
   1.288 +  <div id="textbox_readonly_undefined" role="textbox" aria-readonly="undefined"></div>
   1.289 +  <div id="textbox_readonly_absent" role="textbox"></div>
   1.290 +
   1.291 +  <div id="textbox_multiline_true" role="textbox" aria-multiline="true"></div>
   1.292 +  <div id="textbox_multiline_false" role="textbox" aria-multiline="false"></div>
   1.293 +  <div id="textbox_multiline_empty" role="textbox" aria-multiline=""></div>
   1.294 +  <div id="textbox_multiline_undefined" role="textbox" aria-multiline="undefined"></div>
   1.295 +  <div id="textbox_multiline_absent" role="textbox"></div>
   1.296 +
   1.297 +  <form action="">
   1.298 +    <input id="native_textbox_nativereadonly_ariatrue" readonly="readonly" aria-readonly="true"/>
   1.299 +    <input id="native_textbox_nativereadonly_ariafalse" readonly="readonly" aria-readonly="false"/>
   1.300 +    <input id="native_textbox_nativereadonly_ariaempty" readonly="readonly" aria-readonly=""/>
   1.301 +    <input id="native_textbox_nativereadonly_ariaundefined" readonly="readonly" aria-readonly="undefined"/>
   1.302 +    <input id="native_textbox_nativereadonly_ariaabsent" readonly="readonly"/>
   1.303 +
   1.304 +    <input id="native_textbox_nativeeditable_ariatrue" aria-readonly="true"/>
   1.305 +    <input id="native_textbox_nativeeditable_ariafalse" aria-readonly="false"/>
   1.306 +    <input id="native_textbox_nativeeditable_ariaempty" aria-readonly=""/>
   1.307 +    <input id="native_textbox_nativeeditable_ariaundefined" aria-readonly="undefined"/>
   1.308 +    <input id="native_textbox_nativeeditable_ariaabsent"/>
   1.309 +  </form>
   1.310 +
   1.311 +  <div role="tree">
   1.312 +    <div id="treeitem_selected_true" role="treeitem" aria-selected="true">This treeitem has aria-selected="true" and should get STATE_SELECTABLE. It should also get STATE_SELECTED.</div>
   1.313 +    <div id="treeitem_selected_false" role="treeitem" aria-selected="false">This treeitem has aria-selected="false" and should get STATE_SELECTABLE.</div>
   1.314 +    <div id="treeitem_selected_empty" role="treeitem" aria-selected="">This treeitem has aria-selected="" and should <emph>not</emph> get STATE_SELECTABLE.</div>
   1.315 +    <div id="treeitem_selected_undefined" role="treeitem" aria-selected="undefined">This treeitem has aria-selected="undefined" and should <emph>not</emph> get STATE_SELECTABLE.</div>
   1.316 +    <div id="treeitem_selected_absent" role="treeitem">This treeitem has <emph>no</emph> aria-selected attribute and should <emph>not</emph> get STATE_SELECTABLE.</div>
   1.317 +
   1.318 +    <div id="treeitem_haspopup_true" role="treeitem" aria-haspopup="true">This treeitem has aria-haspopup="true" and should get STATE_HASPOPUP.</div>
   1.319 +    <div id="treeitem_haspopup_false" role="treeitem" aria-haspopup="false">This treeitem has aria-haspopup="false" and should get STATE_HASPOPUP.</div>
   1.320 +    <div id="treeitem_haspopup_empty" role="treeitem" aria-haspopup="">This treeitem has aria-haspopup="" and should <emph>not</emph> get STATE_HASPOPUP.</div>
   1.321 +    <div id="treeitem_haspopup_undefined" role="treeitem" aria-haspopup="undefined">This treeitem has aria-haspopup="undefined" and should <emph>not</emph> get STATE_HASPOPUP.</div>
   1.322 +    <div id="treeitem_haspopup_absent" role="treeitem">This treeitem has <emph>no</emph> aria-haspopup attribute and should <emph>not</emph> get STATE_HASPOPUP.</div>
   1.323 +
   1.324 +    <div id="treeitem_expanded_true" role="treeitem" aria-expanded="true">This treeitem has aria-expanded="true" and should get STATE_EXPANDABLE. It should also get STATE_EXPANDED.</div>
   1.325 +    <div id="treeitem_expanded_false" role="treeitem" aria-expanded="false">This treeitem has aria-expanded="false" and should get STATE_EXPANDABLE. It should also get STATE_COLLAPSED.</div>
   1.326 +    <div id="treeitem_expanded_empty" role="treeitem" aria-expanded="">This treeitem has aria-expanded="" and should <emph>not</emph> get STATE_EXPANDABLE.</div>
   1.327 +    <div id="treeitem_expanded_undefined" role="treeitem" aria-expanded="undefined">This treeitem has aria-expanded="undefined" and should <emph>not</emph> get STATE_EXPANDABLE.</div>
   1.328 +    <div id="treeitem_expanded_absent" role="treeitem">This treeitem has <emph>no</emph> aria-expanded attribute and should <emph>not</emph> get STATE_EXPANDABLE.</div>
   1.329 +  </div>
   1.330 +
   1.331 +  </body>
   1.332 +</html>

mercurial