accessible/tests/mochitest/test_aria_token_attrs.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <!--
michael@0 4 https://bugzilla.mozilla.org/show_bug.cgi?id=452388
michael@0 5 -->
michael@0 6 <head>
michael@0 7 <title>An NMTOKEN based ARIA property is undefined if the ARIA attribute is not present, or is set to "" or "undefined"</title>
michael@0 8 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 9
michael@0 10 <script type="application/javascript"
michael@0 11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 12
michael@0 13 <script type="application/javascript"
michael@0 14 src="common.js"></script>
michael@0 15 <script type="application/javascript"
michael@0 16 src="role.js"></script>
michael@0 17 <script type="application/javascript"
michael@0 18 src="states.js"></script>
michael@0 19
michael@0 20 <script type="application/javascript">
michael@0 21 function doTest()
michael@0 22 {
michael@0 23 // test aria-pressed state mapping to roles PUSHBUTTON vs TOGGLEBUTTON
michael@0 24 testRole("button_pressed_true", ROLE_TOGGLE_BUTTON);
michael@0 25 testRole("button_pressed_false", ROLE_TOGGLE_BUTTON);
michael@0 26 testRole("button_pressed_empty", ROLE_PUSHBUTTON);
michael@0 27 testRole("button_pressed_undefined", ROLE_PUSHBUTTON);
michael@0 28 testRole("button_pressed_absent", ROLE_PUSHBUTTON);
michael@0 29
michael@0 30 // test button aria-pressed states
michael@0 31 testStates("button_pressed_true", STATE_PRESSED, 0, STATE_CHECKABLE);
michael@0 32 testStates("button_pressed_false", 0, 0, STATE_CHECKABLE | STATE_PRESSED);
michael@0 33 testStates("button_pressed_empty", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
michael@0 34 testStates("button_pressed_undefined", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
michael@0 35 testStates("button_pressed_absent", 0, 0, STATE_PRESSED | STATE_CHECKABLE);
michael@0 36
michael@0 37 // test (checkbox) checkable and checked states
michael@0 38 testStates("checkbox_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 39 testStates("checkbox_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 40 testStates("checkbox_checked_empty", STATE_CHECKABLE , 0, STATE_CHECKED);
michael@0 41 testStates("checkbox_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 42 testStates("checkbox_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 43
michael@0 44 // test native checkbox checked state and aria-checked state (if conflict, native wins)
michael@0 45 testStates("native_checkbox_nativechecked_ariatrue", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 46 testStates("native_checkbox_nativechecked_ariafalse", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 47 testStates("native_checkbox_nativechecked_ariaempty", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 48 testStates("native_checkbox_nativechecked_ariaundefined", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 49 testStates("native_checkbox_nativechecked_ariaabsent", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 50
michael@0 51 testStates("native_checkbox_nativeunchecked_ariatrue", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 52 testStates("native_checkbox_nativeunchecked_ariafalse", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 53 testStates("native_checkbox_nativeunchecked_ariaempty", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 54 testStates("native_checkbox_nativeunchecked_ariaundefined", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 55 testStates("native_checkbox_nativeunchecked_ariaabsent", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 56
michael@0 57 // test (checkbox) readonly states
michael@0 58 testStates("checkbox_readonly_true", STATE_READONLY);
michael@0 59 testStates("checkbox_readonly_false", 0, 0, STATE_READONLY);
michael@0 60 testStates("checkbox_readonly_empty", 0, 0, STATE_READONLY);
michael@0 61 testStates("checkbox_readonly_undefined", 0, 0, STATE_READONLY);
michael@0 62 testStates("checkbox_readonly_absent", 0, 0, STATE_READONLY);
michael@0 63
michael@0 64 // test (checkbox) required states
michael@0 65 testStates("checkbox_required_true", STATE_REQUIRED);
michael@0 66 testStates("checkbox_required_false", 0, 0, STATE_REQUIRED);
michael@0 67 testStates("checkbox_required_empty", 0, 0, STATE_REQUIRED);
michael@0 68 testStates("checkbox_required_undefined", 0, 0, STATE_REQUIRED);
michael@0 69 testStates("checkbox_required_absent", 0, 0, STATE_REQUIRED);
michael@0 70
michael@0 71 // test (checkbox) invalid states
michael@0 72 testStates("checkbox_invalid_true", STATE_INVALID);
michael@0 73 testStates("checkbox_invalid_false", 0, 0, STATE_INVALID);
michael@0 74 testStates("checkbox_invalid_empty", 0, 0, STATE_INVALID);
michael@0 75 testStates("checkbox_invalid_undefined", 0, 0, STATE_INVALID);
michael@0 76 testStates("checkbox_invalid_absent", 0, 0, STATE_INVALID);
michael@0 77
michael@0 78 // test (checkbox) disabled states
michael@0 79 testStates("checkbox_disabled_true", STATE_UNAVAILABLE);
michael@0 80 testStates("checkbox_disabled_false", 0, 0, STATE_UNAVAILABLE);
michael@0 81 testStates("checkbox_disabled_empty", 0, 0, STATE_UNAVAILABLE);
michael@0 82 testStates("checkbox_disabled_undefined", 0, 0, STATE_UNAVAILABLE);
michael@0 83 testStates("checkbox_disabled_absent", 0, 0, STATE_UNAVAILABLE);
michael@0 84
michael@0 85 // test (listbox) multiselectable states
michael@0 86 testStates("listbox_multiselectable_true", STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
michael@0 87 testStates("listbox_multiselectable_false", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
michael@0 88 testStates("listbox_multiselectable_empty", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
michael@0 89 testStates("listbox_multiselectable_undefined", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
michael@0 90 testStates("listbox_multiselectable_absent", 0, 0, STATE_MULTISELECTABLE | STATE_EXTSELECTABLE);
michael@0 91
michael@0 92 // test (option) checkable and checked states
michael@0 93 testStates("option_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 94 testStates("option_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 95 testStates("option_checked_empty", 0 , 0, STATE_CHECKABLE | STATE_CHECKED);
michael@0 96 testStates("option_checked_undefined", 0, 0, STATE_CHECKABLE | STATE_CHECKED);
michael@0 97 testStates("option_checked_absent", 0, 0, STATE_CHECKABLE | STATE_CHECKED);
michael@0 98
michael@0 99 // test (menuitem) checkable and checked states
michael@0 100 testStates("menuitem_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 101 testStates("menuitem_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 102 testStates("menuitem_checked_empty", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
michael@0 103 testStates("menuitem_checked_undefined", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
michael@0 104 testStates("menuitem_checked_absent", 0, 0, (STATE_CHECKABLE | STATE_CHECKED));
michael@0 105
michael@0 106 // test (menuitemradio) checkable and checked states
michael@0 107 testStates("menuitemradio_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 108 testStates("menuitemradio_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 109 testStates("menuitemradio_checked_empty", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 110 testStates("menuitemradio_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 111 testStates("menuitemradio_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 112
michael@0 113 // test (radio) checkable and checked states
michael@0 114 testStates("radio_checked_true", (STATE_CHECKABLE | STATE_CHECKED));
michael@0 115 testStates("radio_checked_false", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 116 testStates("radio_checked_empty", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 117 testStates("radio_checked_undefined", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 118 testStates("radio_checked_absent", STATE_CHECKABLE, 0, STATE_CHECKED);
michael@0 119
michael@0 120 // test (textbox) multiline states
michael@0 121 testStates("textbox_multiline_true", 0, EXT_STATE_MULTI_LINE);
michael@0 122 testStates("textbox_multiline_false", 0, EXT_STATE_SINGLE_LINE);
michael@0 123 testStates("textbox_multiline_empty", 0, EXT_STATE_SINGLE_LINE);
michael@0 124 testStates("textbox_multiline_undefined", 0, EXT_STATE_SINGLE_LINE);
michael@0 125 testStates("textbox_multiline_absent", 0, EXT_STATE_SINGLE_LINE);
michael@0 126
michael@0 127 // test (textbox) readonly states
michael@0 128 testStates("textbox_readonly_true", STATE_READONLY);
michael@0 129 testStates("textbox_readonly_false", 0, EXT_STATE_EDITABLE, STATE_READONLY);
michael@0 130 testStates("textbox_readonly_empty", 0, EXT_STATE_EDITABLE, STATE_READONLY);
michael@0 131 testStates("textbox_readonly_undefined", 0, EXT_STATE_EDITABLE, STATE_READONLY);
michael@0 132 testStates("textbox_readonly_absent", 0, EXT_STATE_EDITABLE, STATE_READONLY);
michael@0 133
michael@0 134 // test native textbox readonly state and aria-readonly state (if conflict, native wins)
michael@0 135 testStates("native_textbox_nativereadonly_ariatrue", STATE_READONLY);
michael@0 136 testStates("native_textbox_nativereadonly_ariafalse", STATE_READONLY);
michael@0 137 testStates("native_textbox_nativereadonly_ariaempty", STATE_READONLY);
michael@0 138 testStates("native_textbox_nativereadonly_ariaundefined", STATE_READONLY);
michael@0 139 testStates("native_textbox_nativereadonly_ariaabsent", STATE_READONLY);
michael@0 140
michael@0 141 testStates("native_textbox_nativeeditable_ariatrue", 0, 0, STATE_READONLY);
michael@0 142 testStates("native_textbox_nativeeditable_ariafalse", 0, 0, STATE_READONLY);
michael@0 143 testStates("native_textbox_nativeeditable_ariaempty", 0, 0, STATE_READONLY);
michael@0 144 testStates("native_textbox_nativeeditable_ariaundefined", 0, 0, STATE_READONLY);
michael@0 145 testStates("native_textbox_nativeeditable_ariaabsent", 0, 0, STATE_READONLY);
michael@0 146
michael@0 147 // test (treeitem) selectable and selected states
michael@0 148 testStates("treeitem_selected_true", (STATE_SELECTABLE | STATE_SELECTED));
michael@0 149 testStates("treeitem_selected_false", STATE_SELECTABLE, 0, STATE_SELECTED);
michael@0 150 testStates("treeitem_selected_empty", STATE_SELECTABLE, 0, STATE_SELECTED);
michael@0 151 testStates("treeitem_selected_undefined", STATE_SELECTABLE, 0, STATE_SELECTED);
michael@0 152 testStates("treeitem_selected_absent", STATE_SELECTABLE, 0, STATE_SELECTED);
michael@0 153
michael@0 154 // test (treeitem) haspopup states
michael@0 155 testStates("treeitem_haspopup_true", STATE_HASPOPUP);
michael@0 156 testStates("treeitem_haspopup_false", 0, 0, STATE_HASPOPUP);
michael@0 157 testStates("treeitem_haspopup_empty", 0, 0, STATE_HASPOPUP);
michael@0 158 testStates("treeitem_haspopup_undefined", 0, 0, STATE_HASPOPUP);
michael@0 159 testStates("treeitem_haspopup_absent", 0, 0, STATE_HASPOPUP);
michael@0 160
michael@0 161 // test (treeitem) expandable and expanded/collapsed states
michael@0 162 testStates("treeitem_expanded_true", STATE_EXPANDED, EXT_STATE_EXPANDABLE);
michael@0 163 testStates("treeitem_expanded_false", STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
michael@0 164 testStates("treeitem_expanded_empty", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
michael@0 165 testStates("treeitem_expanded_undefined", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
michael@0 166 testStates("treeitem_expanded_absent", 0, 0, STATE_EXPANDED | STATE_COLLAPSED, EXT_STATE_EXPANDABLE);
michael@0 167
michael@0 168 SimpleTest.finish();
michael@0 169 }
michael@0 170
michael@0 171 SimpleTest.waitForExplicitFinish();
michael@0 172 addA11yLoadEvent(doTest);
michael@0 173 </script>
michael@0 174 </head>
michael@0 175 <body>
michael@0 176
michael@0 177 <a target="_blank"
michael@0 178 href="https://bugzilla.mozilla.org/show_bug.cgi?id=452388">
michael@0 179 Mozilla Bug 452388
michael@0 180 </a>
michael@0 181 <a target="_blank"
michael@0 182 href="https://bugzilla.mozilla.org/show_bug.cgi?id=499653"
michael@0 183 title="Unify ARIA state attributes mapping rules">
michael@0 184 Mozilla Bug 499653
michael@0 185 </a>
michael@0 186 <a target="_blank"
michael@0 187 href="https://bugzilla.mozilla.org/show_bug.cgi?id=989958"
michael@0 188 title="Pressed state is not exposed on a button element with aria-pressed attribute"
michael@0 189 Mozilla Bug 989958
michael@0 190 </a>
michael@0 191 <p id="display"></p>
michael@0 192 <div id="content" style="display: none"></div>
michael@0 193 <pre id="test">
michael@0 194 </pre>
michael@0 195
michael@0 196 <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>
michael@0 197 <div id="button_pressed_false" role="button" aria-pressed="false">This button has aria-pressed="false" and should get ROLE_TOGGLE_BUTTON.</div>
michael@0 198 <div id="button_pressed_empty" role="button" aria-pressed="">This button has aria-pressed="" and should <emph>not</emph> get ROLE_BUTTON.</div>
michael@0 199 <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>
michael@0 200 <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>
michael@0 201
michael@0 202 <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>
michael@0 203 <div id="checkbox_checked_false" role="checkbox" aria-checked="false">This checkbox has aria-checked="false" and should get STATE_CHECKABLE.</div>
michael@0 204 <div id="checkbox_checked_empty" role="checkbox" aria-checked="">This checkbox has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
michael@0 205 <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>
michael@0 206 <div id="checkbox_checked_absent" role="checkbox">This checkbox has <emph>no</emph> aria-checked attribute and should get STATE_CHECKABLE.</div>
michael@0 207
michael@0 208 <form action="">
michael@0 209 <input id="native_checkbox_nativechecked_ariatrue" type="checkbox" checked="checked" aria-checked="true"/>
michael@0 210 <input id="native_checkbox_nativechecked_ariafalse" type="checkbox" checked="checked" aria-checked="false"/>
michael@0 211 <input id="native_checkbox_nativechecked_ariaempty" type="checkbox" checked="checked" aria-checked=""/>
michael@0 212 <input id="native_checkbox_nativechecked_ariaundefined" type="checkbox" checked="checked" aria-checked="undefined"/>
michael@0 213 <input id="native_checkbox_nativechecked_ariaabsent" type="checkbox" checked="checked"/>
michael@0 214
michael@0 215 <input id="native_checkbox_nativeunchecked_ariatrue" type="checkbox" aria-checked="true"/>
michael@0 216 <input id="native_checkbox_nativeunchecked_ariafalse" type="checkbox" aria-checked="false"/>
michael@0 217 <input id="native_checkbox_nativeunchecked_ariaempty" type="checkbox" aria-checked=""/>
michael@0 218 <input id="native_checkbox_nativeunchecked_ariaundefined" type="checkbox" aria-checked="undefined"/>
michael@0 219 <input id="native_checkbox_nativeunchecked_ariaabsent" type="checkbox"/>
michael@0 220 </form>
michael@0 221
michael@0 222 <div id="checkbox_readonly_true" role="checkbox" aria-readonly="true">This checkbox has aria-readonly="true" and should get STATE_READONLY.</div>
michael@0 223 <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>
michael@0 224 <div id="checkbox_readonly_empty" role="checkbox" aria-readonly="">This checkbox has aria-readonly="" and should <emph>not</emph> get STATE_READONLY.</div>
michael@0 225 <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>
michael@0 226 <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>
michael@0 227
michael@0 228 <div id="checkbox_required_true" role="checkbox" aria-required="true">This checkbox has aria-required="true" and should get STATE_REQUIRED.</div>
michael@0 229 <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>
michael@0 230 <div id="checkbox_required_empty" role="checkbox" aria-required="">This checkbox has aria-required="" and should <emph>not</emph> get STATE_REQUIRED.</div>
michael@0 231 <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>
michael@0 232 <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>
michael@0 233
michael@0 234 <div id="checkbox_invalid_true" role="checkbox" aria-invalid="true">This checkbox has aria-invalid="true" and should get STATE_INVALID.</div>
michael@0 235 <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>
michael@0 236 <div id="checkbox_invalid_empty" role="checkbox" aria-invalid="">This checkbox has aria-invalid="" and should <emph>not</emph> get STATE_INVALID.</div>
michael@0 237 <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>
michael@0 238 <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>
michael@0 239
michael@0 240 <div id="checkbox_disabled_true" role="checkbox" aria-disabled="true" tabindex="0">This checkbox has aria-disabled="true" and should get STATE_DISABLED.</div>
michael@0 241 <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>
michael@0 242 <div id="checkbox_disabled_empty" role="checkbox" aria-disabled="">This checkbox has aria-disabled="" and should <emph>not</emph> get STATE_DISABLED.</div>
michael@0 243 <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>
michael@0 244 <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>
michael@0 245
michael@0 246 <div id="listbox_multiselectable_true" role="listbox" aria-multiselectable="true">
michael@0 247 <div id="option_checked_true" role="option" aria-checked="true">item</div>
michael@0 248 </div>
michael@0 249 <div id="listbox_multiselectable_false" role="listbox" aria-multiselectable="false">
michael@0 250 <div id="option_checked_false" role="option" aria-checked="false">item</div>
michael@0 251 </div>
michael@0 252 <div id="listbox_multiselectable_empty" role="listbox" aria-multiselectable="">
michael@0 253 <div id="option_checked_empty" role="option" aria-checked="">item</div>
michael@0 254 </div>
michael@0 255 <div id="listbox_multiselectable_undefined" role="listbox" aria-multiselectable="undefined">
michael@0 256 <div id="option_checked_undefined" role="option" aria-checked="undefined">item</div>
michael@0 257 </div>
michael@0 258 <div id="listbox_multiselectable_absent" role="listbox">
michael@0 259 <div id="option_checked_absent" role="option">item</div>
michael@0 260 </div>
michael@0 261
michael@0 262 <div role="menu">
michael@0 263 <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>
michael@0 264 <div id="menuitem_checked_false" role="menuitem" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
michael@0 265 <div id="menuitem_checked_empty" role="menuitem" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
michael@0 266 <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>
michael@0 267 <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>
michael@0 268
michael@0 269 <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>
michael@0 270 <div id="menuitemradio_checked_false" role="menuitemradio" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
michael@0 271 <div id="menuitemradio_checked_empty" role="menuitemradio" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
michael@0 272 <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>
michael@0 273 <div id="menuitemradio_checked_absent" role="menuitemradio">This menuitem has <emph>no</emph> aria-checked attribute but should get STATE_CHECKABLE.</div>
michael@0 274 </div>
michael@0 275
michael@0 276 <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>
michael@0 277 <div id="radio_checked_false" role="radio" aria-checked="false">This menuitem has aria-checked="false" and should get STATE_CHECKABLE.</div>
michael@0 278 <div id="radio_checked_empty" role="radio" aria-checked="">This menuitem has aria-checked="" and should <emph>not</emph> get STATE_CHECKABLE.</div>
michael@0 279 <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>
michael@0 280 <div id="radio_checked_absent" role="radio">This menuitem has <emph>no</emph> aria-checked attribute but should get STATE_CHECKABLE.</div>
michael@0 281
michael@0 282 <div id="textbox_readonly_true" role="textbox" aria-readonly="true"></div>
michael@0 283 <div id="textbox_readonly_false" role="textbox" aria-readonly="false"></div>
michael@0 284 <div id="textbox_readonly_empty" role="textbox" aria-readonly=""></div>
michael@0 285 <div id="textbox_readonly_undefined" role="textbox" aria-readonly="undefined"></div>
michael@0 286 <div id="textbox_readonly_absent" role="textbox"></div>
michael@0 287
michael@0 288 <div id="textbox_multiline_true" role="textbox" aria-multiline="true"></div>
michael@0 289 <div id="textbox_multiline_false" role="textbox" aria-multiline="false"></div>
michael@0 290 <div id="textbox_multiline_empty" role="textbox" aria-multiline=""></div>
michael@0 291 <div id="textbox_multiline_undefined" role="textbox" aria-multiline="undefined"></div>
michael@0 292 <div id="textbox_multiline_absent" role="textbox"></div>
michael@0 293
michael@0 294 <form action="">
michael@0 295 <input id="native_textbox_nativereadonly_ariatrue" readonly="readonly" aria-readonly="true"/>
michael@0 296 <input id="native_textbox_nativereadonly_ariafalse" readonly="readonly" aria-readonly="false"/>
michael@0 297 <input id="native_textbox_nativereadonly_ariaempty" readonly="readonly" aria-readonly=""/>
michael@0 298 <input id="native_textbox_nativereadonly_ariaundefined" readonly="readonly" aria-readonly="undefined"/>
michael@0 299 <input id="native_textbox_nativereadonly_ariaabsent" readonly="readonly"/>
michael@0 300
michael@0 301 <input id="native_textbox_nativeeditable_ariatrue" aria-readonly="true"/>
michael@0 302 <input id="native_textbox_nativeeditable_ariafalse" aria-readonly="false"/>
michael@0 303 <input id="native_textbox_nativeeditable_ariaempty" aria-readonly=""/>
michael@0 304 <input id="native_textbox_nativeeditable_ariaundefined" aria-readonly="undefined"/>
michael@0 305 <input id="native_textbox_nativeeditable_ariaabsent"/>
michael@0 306 </form>
michael@0 307
michael@0 308 <div role="tree">
michael@0 309 <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>
michael@0 310 <div id="treeitem_selected_false" role="treeitem" aria-selected="false">This treeitem has aria-selected="false" and should get STATE_SELECTABLE.</div>
michael@0 311 <div id="treeitem_selected_empty" role="treeitem" aria-selected="">This treeitem has aria-selected="" and should <emph>not</emph> get STATE_SELECTABLE.</div>
michael@0 312 <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>
michael@0 313 <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>
michael@0 314
michael@0 315 <div id="treeitem_haspopup_true" role="treeitem" aria-haspopup="true">This treeitem has aria-haspopup="true" and should get STATE_HASPOPUP.</div>
michael@0 316 <div id="treeitem_haspopup_false" role="treeitem" aria-haspopup="false">This treeitem has aria-haspopup="false" and should get STATE_HASPOPUP.</div>
michael@0 317 <div id="treeitem_haspopup_empty" role="treeitem" aria-haspopup="">This treeitem has aria-haspopup="" and should <emph>not</emph> get STATE_HASPOPUP.</div>
michael@0 318 <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>
michael@0 319 <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>
michael@0 320
michael@0 321 <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>
michael@0 322 <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>
michael@0 323 <div id="treeitem_expanded_empty" role="treeitem" aria-expanded="">This treeitem has aria-expanded="" and should <emph>not</emph> get STATE_EXPANDABLE.</div>
michael@0 324 <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>
michael@0 325 <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>
michael@0 326 </div>
michael@0 327
michael@0 328 </body>
michael@0 329 </html>

mercurial