Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | <html> |
michael@0 | 2 | |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>ARIA based nsIAccessible states testing</title> |
michael@0 | 5 | |
michael@0 | 6 | <link rel="stylesheet" type="text/css" |
michael@0 | 7 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 8 | |
michael@0 | 9 | <style type="text/css"> |
michael@0 | 10 | .offscreen { |
michael@0 | 11 | position: absolute; |
michael@0 | 12 | left: -5000px; |
michael@0 | 13 | top: -5000px; |
michael@0 | 14 | height: 100px; |
michael@0 | 15 | width: 100px; |
michael@0 | 16 | } |
michael@0 | 17 | </style> |
michael@0 | 18 | |
michael@0 | 19 | <script type="application/javascript" |
michael@0 | 20 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 21 | |
michael@0 | 22 | <script type="application/javascript" |
michael@0 | 23 | src="../common.js"></script> |
michael@0 | 24 | <script type="application/javascript" |
michael@0 | 25 | src="../role.js"></script> |
michael@0 | 26 | <script type="application/javascript" |
michael@0 | 27 | src="../states.js"></script> |
michael@0 | 28 | |
michael@0 | 29 | <script type="application/javascript"> |
michael@0 | 30 | function testAriaDisabledTree(aAccOrElmOrID) |
michael@0 | 31 | { |
michael@0 | 32 | // test accessible and its subtree for propagated state. |
michael@0 | 33 | var acc = getAccessible(aAccOrElmOrID); |
michael@0 | 34 | if (!acc) |
michael@0 | 35 | return; |
michael@0 | 36 | |
michael@0 | 37 | var [state, extraState] = getStates(aAccOrElmOrID); |
michael@0 | 38 | if (state & STATE_UNAVAILABLE) { |
michael@0 | 39 | var role = getRole(acc); |
michael@0 | 40 | if (role != ROLE_GROUPING) { |
michael@0 | 41 | testStates(acc, STATE_FOCUSABLE); |
michael@0 | 42 | } |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | // Iterate over its children to see if the state got propagated. |
michael@0 | 46 | var children = null; |
michael@0 | 47 | try { |
michael@0 | 48 | children = acc.children; |
michael@0 | 49 | } catch(e) {} |
michael@0 | 50 | ok(children, "Could not get children for " + aAccOrElmOrID +"!"); |
michael@0 | 51 | |
michael@0 | 52 | if (children) { |
michael@0 | 53 | for (var i = 0; i < children.length; i++) { |
michael@0 | 54 | var childAcc = children.queryElementAt(i, nsIAccessible); |
michael@0 | 55 | testAriaDisabledTree(childAcc); |
michael@0 | 56 | } |
michael@0 | 57 | } |
michael@0 | 58 | } |
michael@0 | 59 | |
michael@0 | 60 | function doTest() |
michael@0 | 61 | { |
michael@0 | 62 | // aria_autocomplete |
michael@0 | 63 | testStates("textbox_autocomplete_inline", 0, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 64 | testStates("textbox_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 65 | testStates("textbox_autocomplete_both", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 66 | testStates("combobox_autocomplete_inline", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 67 | testStates("combobox_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 68 | testStates("combobox_autocomplete_both", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 69 | |
michael@0 | 70 | testStates("htmltext_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 71 | testStates("htmltextarea_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION); |
michael@0 | 72 | |
michael@0 | 73 | // aria-busy |
michael@0 | 74 | testStates("textbox_busy_false", 0, 0, STATE_BUSY); |
michael@0 | 75 | testStates("textbox_busy_true", STATE_BUSY); |
michael@0 | 76 | testStates("textbox_busy_error", STATE_INVALID); |
michael@0 | 77 | |
michael@0 | 78 | // aria-expanded |
michael@0 | 79 | testStates("combobox", STATE_COLLAPSED); |
michael@0 | 80 | testStates("combobox_expanded", STATE_EXPANDED); |
michael@0 | 81 | |
michael@0 | 82 | // tri-state checkbox |
michael@0 | 83 | var checkboxElem = getNode("check1"); |
michael@0 | 84 | if (checkboxElem) { |
michael@0 | 85 | testStates(checkboxElem, STATE_CHECKED); |
michael@0 | 86 | checkboxElem.checked = false; |
michael@0 | 87 | testStates(checkboxElem, 0, 0, STATE_CHECKED); |
michael@0 | 88 | checkboxElem.indeterminate = true; |
michael@0 | 89 | testStates(checkboxElem, STATE_MIXED, 0); |
michael@0 | 90 | } |
michael@0 | 91 | |
michael@0 | 92 | // aria-checked |
michael@0 | 93 | testStates("aria_checked_checkbox", STATE_CHECKED); |
michael@0 | 94 | testStates("aria_mixed_checkbox", STATE_MIXED); |
michael@0 | 95 | |
michael@0 | 96 | // test disabled group and all its descendants to see if they are |
michael@0 | 97 | // disabled, too. See bug 429285. |
michael@0 | 98 | testAriaDisabledTree("group"); |
michael@0 | 99 | |
michael@0 | 100 | // aria-multiline |
michael@0 | 101 | testStates("aria_multiline_textbox", 0, EXT_STATE_MULTI_LINE); |
michael@0 | 102 | |
michael@0 | 103 | // aria-multiselectable |
michael@0 | 104 | testStates("aria_multiselectable_listbox", |
michael@0 | 105 | STATE_MULTISELECTABLE | STATE_EXTSELECTABLE); |
michael@0 | 106 | |
michael@0 | 107 | // aria-pressed |
michael@0 | 108 | testStates("aria_pressed_button", STATE_PRESSED, 0, STATE_CHECKABLE); |
michael@0 | 109 | testStates("aria_pressed_native_button", STATE_PRESSED, 0, STATE_CHECKABLE); |
michael@0 | 110 | |
michael@0 | 111 | // aria-readonly |
michael@0 | 112 | testStates("aria_readonly_textbox", STATE_READONLY); |
michael@0 | 113 | |
michael@0 | 114 | // readonly/editable on grid and gridcell |
michael@0 | 115 | testStates("aria_grid_default", 0, EXT_STATE_EDITABLE, |
michael@0 | 116 | STATE_READONLY, 0); |
michael@0 | 117 | testStates("aria_grid_default_colheader_readonly", STATE_READONLY, 0, |
michael@0 | 118 | 0, EXT_STATE_EDITABLE); |
michael@0 | 119 | testStates("aria_grid_default_colheader_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 120 | STATE_READONLY, 0); |
michael@0 | 121 | testStates("aria_grid_default_rowheader_readonly", STATE_READONLY, 0, |
michael@0 | 122 | 0, EXT_STATE_EDITABLE); |
michael@0 | 123 | testStates("aria_grid_default_rowheader_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 124 | STATE_READONLY, 0); |
michael@0 | 125 | testStates("aria_grid_default_cell_readonly", STATE_READONLY, 0, |
michael@0 | 126 | 0, EXT_STATE_EDITABLE); |
michael@0 | 127 | testStates("aria_grid_default_cell_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 128 | STATE_READONLY, 0); |
michael@0 | 129 | |
michael@0 | 130 | testStates("aria_grid_readonly", STATE_READONLY, 0, |
michael@0 | 131 | 0, EXT_STATE_EDITABLE); |
michael@0 | 132 | testStates("aria_grid_readonly_colheader_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 133 | STATE_READONLY, 0); |
michael@0 | 134 | testStates("aria_grid_readonly_colheader_inherited", STATE_READONLY, 0, |
michael@0 | 135 | 0, EXT_STATE_EDITABLE); |
michael@0 | 136 | testStates("aria_grid_readonly_rowheader_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 137 | STATE_READONLY, 0); |
michael@0 | 138 | testStates("aria_grid_readonly_rowheader_inherited", STATE_READONLY, 0, |
michael@0 | 139 | 0, EXT_STATE_EDITABLE); |
michael@0 | 140 | testStates("aria_grid_readonly_cell_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 141 | STATE_READONLY, 0); |
michael@0 | 142 | testStates("aria_grid_readonly_cell_inherited", STATE_READONLY, 0, |
michael@0 | 143 | 0, EXT_STATE_EDITABLE); |
michael@0 | 144 | |
michael@0 | 145 | // readonly/editable on treegrid and gridcell |
michael@0 | 146 | testStates("aria_treegrid_default", 0, EXT_STATE_EDITABLE, |
michael@0 | 147 | STATE_READONLY, 0); |
michael@0 | 148 | testStates("aria_treegrid_default_colheader_readonly", STATE_READONLY, 0, |
michael@0 | 149 | 0, EXT_STATE_EDITABLE); |
michael@0 | 150 | testStates("aria_treegrid_default_colheader_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 151 | STATE_READONLY, 0); |
michael@0 | 152 | testStates("aria_treegrid_default_rowheader_readonly", STATE_READONLY, 0, |
michael@0 | 153 | 0, EXT_STATE_EDITABLE); |
michael@0 | 154 | testStates("aria_treegrid_default_rowheader_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 155 | STATE_READONLY, 0); |
michael@0 | 156 | testStates("aria_treegrid_default_cell_readonly", STATE_READONLY, 0, |
michael@0 | 157 | 0, EXT_STATE_EDITABLE); |
michael@0 | 158 | testStates("aria_treegrid_default_cell_inherited", 0, EXT_STATE_EDITABLE, |
michael@0 | 159 | STATE_READONLY, 0); |
michael@0 | 160 | |
michael@0 | 161 | testStates("aria_treegrid_readonly", STATE_READONLY, 0, |
michael@0 | 162 | 0, EXT_STATE_EDITABLE); |
michael@0 | 163 | testStates("aria_treegrid_readonly_colheader_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 164 | STATE_READONLY, 0); |
michael@0 | 165 | testStates("aria_treegrid_readonly_colheader_inherited", STATE_READONLY, 0, |
michael@0 | 166 | 0, EXT_STATE_EDITABLE); |
michael@0 | 167 | testStates("aria_treegrid_readonly_rowheader_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 168 | STATE_READONLY, 0); |
michael@0 | 169 | testStates("aria_treegrid_readonly_rowheader_inherited", STATE_READONLY, 0, |
michael@0 | 170 | 0, EXT_STATE_EDITABLE); |
michael@0 | 171 | testStates("aria_treegrid_readonly_cell_editable", 0, EXT_STATE_EDITABLE, |
michael@0 | 172 | STATE_READONLY, 0); |
michael@0 | 173 | testStates("aria_treegrid_readonly_cell_inherited", STATE_READONLY, 0, |
michael@0 | 174 | 0, EXT_STATE_EDITABLE); |
michael@0 | 175 | |
michael@0 | 176 | // aria-selectable |
michael@0 | 177 | testStates("aria_selectable_listitem", STATE_SELECTABLE | STATE_SELECTED); |
michael@0 | 178 | |
michael@0 | 179 | // active state caused by aria-activedescendant |
michael@0 | 180 | testStates("as_item1", 0, EXT_STATE_ACTIVE); |
michael@0 | 181 | testStates("as_item2", 0, 0, 0, EXT_STATE_ACTIVE); |
michael@0 | 182 | |
michael@0 | 183 | // universal ARIA properties inherited from file input control |
michael@0 | 184 | var fileBrowseButton = getAccessible("fileinput").firstChild; |
michael@0 | 185 | testStates(fileBrowseButton, |
michael@0 | 186 | STATE_BUSY | STATE_UNAVAILABLE | STATE_REQUIRED | STATE_HASPOPUP | STATE_INVALID); |
michael@0 | 187 | // No states on the label. |
michael@0 | 188 | |
michael@0 | 189 | // offscreen test |
michael@0 | 190 | testStates("aria_offscreen_textbox", STATE_OFFSCREEN); |
michael@0 | 191 | |
michael@0 | 192 | // |
michael@0 | 193 | // This section tests aria roles on links/anchors for underlying |
michael@0 | 194 | // HTMLLinkAccessible creation. (see closed bug 494807) |
michael@0 | 195 | // |
michael@0 | 196 | |
michael@0 | 197 | // strong roles |
michael@0 | 198 | testStates("aria_menuitem_link", 0, 0, STATE_LINKED); |
michael@0 | 199 | testStates("aria_button_link", 0, 0, STATE_LINKED); |
michael@0 | 200 | testStates("aria_checkbox_link", 0, 0, STATE_LINKED); |
michael@0 | 201 | |
michael@0 | 202 | // strong landmark |
michael@0 | 203 | testStates("aria_application_link", 0, 0, STATE_LINKED); |
michael@0 | 204 | testStates("aria_application_anchor", 0, 0, STATE_SELECTABLE); |
michael@0 | 205 | |
michael@0 | 206 | // strange cases |
michael@0 | 207 | testStates("aria_link_link", STATE_LINKED); |
michael@0 | 208 | testStates("aria_link_anchor", STATE_SELECTABLE); |
michael@0 | 209 | |
michael@0 | 210 | // some weak landmarks |
michael@0 | 211 | testStates("aria_main_link", STATE_LINKED); |
michael@0 | 212 | testStates("aria_navigation_link", STATE_LINKED); |
michael@0 | 213 | testStates("aria_main_anchor", STATE_SELECTABLE); |
michael@0 | 214 | testStates("aria_navigation_anchor", STATE_SELECTABLE); |
michael@0 | 215 | |
michael@0 | 216 | // aria-orientation (applied to scrollbar, separator, slider) |
michael@0 | 217 | testStates("aria_scrollbar", 0, EXT_STATE_VERTICAL, 0, EXT_STATE_HORIZONTAL); |
michael@0 | 218 | testStates("aria_hscrollbar", 0, EXT_STATE_HORIZONTAL, 0, EXT_STATE_VERTICAL); |
michael@0 | 219 | testStates("aria_vscrollbar", 0, EXT_STATE_VERTICAL, 0, EXT_STATE_HORIZONTAL); |
michael@0 | 220 | testStates("aria_separator", 0, EXT_STATE_HORIZONTAL, 0, EXT_STATE_VERTICAL); |
michael@0 | 221 | testStates("aria_hseparator", 0, EXT_STATE_HORIZONTAL, 0, EXT_STATE_VERTICAL); |
michael@0 | 222 | testStates("aria_vseparator", 0, EXT_STATE_VERTICAL, 0, EXT_STATE_HORIZONTAL); |
michael@0 | 223 | testStates("aria_slider", 0, EXT_STATE_HORIZONTAL, 0, EXT_STATE_VERTICAL); |
michael@0 | 224 | testStates("aria_hslider", 0, EXT_STATE_HORIZONTAL, 0, EXT_STATE_VERTICAL); |
michael@0 | 225 | testStates("aria_vslider", 0, EXT_STATE_VERTICAL, 0, EXT_STATE_HORIZONTAL); |
michael@0 | 226 | |
michael@0 | 227 | // indeterminate ARIA progressbars (no aria-valuenow or aria-valuetext attribute) |
michael@0 | 228 | // should expose mixed state |
michael@0 | 229 | testStates("aria_progressbar", STATE_MIXED); |
michael@0 | 230 | testStates("aria_progressbar_valuenow", 0, 0, STATE_MIXED); |
michael@0 | 231 | testStates("aria_progressbar_valuetext", 0, 0, STATE_MIXED); |
michael@0 | 232 | |
michael@0 | 233 | testStates("aria_listbox", STATE_FOCUSABLE); |
michael@0 | 234 | testStates("aria_grid", STATE_FOCUSABLE); |
michael@0 | 235 | testStates("aria_tree", STATE_FOCUSABLE); |
michael@0 | 236 | testStates("aria_treegrid", STATE_FOCUSABLE); |
michael@0 | 237 | testStates("aria_listbox_disabled", 0, 0, STATE_FOCUSABLE); |
michael@0 | 238 | testStates("aria_grid_disabled", 0, 0, STATE_FOCUSABLE); |
michael@0 | 239 | testStates("aria_tree_disabled", 0, 0, STATE_FOCUSABLE); |
michael@0 | 240 | testStates("aria_treegrid_disabled", 0, 0, STATE_FOCUSABLE); |
michael@0 | 241 | SimpleTest.finish(); |
michael@0 | 242 | } |
michael@0 | 243 | |
michael@0 | 244 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 245 | addA11yLoadEvent(doTest); |
michael@0 | 246 | </script> |
michael@0 | 247 | |
michael@0 | 248 | </head> |
michael@0 | 249 | |
michael@0 | 250 | <body> |
michael@0 | 251 | |
michael@0 | 252 | <a target="_blank" |
michael@0 | 253 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=457219" |
michael@0 | 254 | title="nsIAccessible states testing"> |
michael@0 | 255 | Mozilla Bug 457219 |
michael@0 | 256 | </a><br /> |
michael@0 | 257 | <a target="_blank" |
michael@0 | 258 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=429285" |
michael@0 | 259 | title="Propagate aria-disabled to descendants"> |
michael@0 | 260 | Mozilla Bug 429285 |
michael@0 | 261 | </a> |
michael@0 | 262 | <a target="_blank" |
michael@0 | 263 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=457226" |
michael@0 | 264 | title="Mochitests for ARIA states"> |
michael@0 | 265 | Mozilla Bug 457226 |
michael@0 | 266 | </a> |
michael@0 | 267 | <a target="_blank" |
michael@0 | 268 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=499653" |
michael@0 | 269 | title="Unify ARIA state attributes mapping rules"> |
michael@0 | 270 | Mozilla Bug 499653 |
michael@0 | 271 | </a> |
michael@0 | 272 | <a target="_blank" |
michael@0 | 273 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=681674" |
michael@0 | 274 | title="aria-autocomplete not supported on standard form text input controls"> |
michael@0 | 275 | Mozilla Bug 681674 |
michael@0 | 276 | </a> |
michael@0 | 277 | <a target="_blank" |
michael@0 | 278 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=681674" |
michael@0 | 279 | title="aria-orientation should be applied to separator and slider roles"> |
michael@0 | 280 | Mozilla Bug 681674 |
michael@0 | 281 | </a> |
michael@0 | 282 | <a target="_blank" |
michael@0 | 283 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=689847" |
michael@0 | 284 | title="Expose active state on current item of selectable widgets"> |
michael@0 | 285 | Mozilla Bug 689847 |
michael@0 | 286 | </a> |
michael@0 | 287 | <a target="_blank" |
michael@0 | 288 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=699017" |
michael@0 | 289 | title="File input control should be propogate states to descendants"> |
michael@0 | 290 | Mozilla Bug 699017 |
michael@0 | 291 | </a> |
michael@0 | 292 | <a target="_blank" |
michael@0 | 293 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=690199" |
michael@0 | 294 | title="ARIA select widget should expose focusable state regardless the way they manage its children"> |
michael@0 | 295 | Mozilla Bug 690199 |
michael@0 | 296 | </a> |
michael@0 | 297 | <a target="_blank" |
michael@0 | 298 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=740851" |
michael@0 | 299 | title="ARIA undetermined progressmeters should expose mixed state"> |
michael@0 | 300 | Mozilla Bug 740851 |
michael@0 | 301 | </a> |
michael@0 | 302 | <a target="_blank" |
michael@0 | 303 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=762876" |
michael@0 | 304 | title="fix default horizontal / vertical state of role=scrollbar and ensure only one of horizontal / vertical states is exposed"> |
michael@0 | 305 | Mozilla Bug 762876 |
michael@0 | 306 | </a> |
michael@0 | 307 | <a target="_blank" |
michael@0 | 308 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=892091" |
michael@0 | 309 | title="ARIA treegrid should be editable by default"> |
michael@0 | 310 | Bug 892091 |
michael@0 | 311 | </a> |
michael@0 | 312 | <a target="_blank" |
michael@0 | 313 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=835121" |
michael@0 | 314 | title="ARIA grid should be editable by default"> |
michael@0 | 315 | Mozilla Bug 835121 |
michael@0 | 316 | </a> |
michael@0 | 317 | <a target="_blank" |
michael@0 | 318 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=989958" |
michael@0 | 319 | title="Pressed state is not exposed on a button element with aria-pressed attribute" |
michael@0 | 320 | Mozilla Bug 989958 |
michael@0 | 321 | </a> |
michael@0 | 322 | |
michael@0 | 323 | <p id="display"></p> |
michael@0 | 324 | <div id="content" style="display: none"></div> |
michael@0 | 325 | <pre id="test"> |
michael@0 | 326 | </pre> |
michael@0 | 327 | |
michael@0 | 328 | <div id="textbox_autocomplete_inline" role="textbox" aria-autocomplete="inline"></div> |
michael@0 | 329 | <div id="textbox_autocomplete_list" role="textbox" aria-autocomplete="list"></div> |
michael@0 | 330 | <div id="textbox_autocomplete_both" role="textbox" aria-autocomplete="both"></div> |
michael@0 | 331 | <div id="combobox_autocomplete_inline" role="combobox" aria-autocomplete="inline"></div> |
michael@0 | 332 | <div id="combobox_autocomplete_list" role="combobox" aria-autocomplete="list"></div> |
michael@0 | 333 | <div id="combobox_autocomplete_both" role="combobox" aria-autocomplete="both"></div> |
michael@0 | 334 | |
michael@0 | 335 | <input id="htmltext_autocomplete_list" type="text" aria-autocomplete="list" /> |
michael@0 | 336 | <textarea id="htmltextarea_autocomplete_list" aria-autocomplete="list"></textarea> |
michael@0 | 337 | |
michael@0 | 338 | <div id="textbox_busy_false" role="textbox" aria-busy="false"></div> |
michael@0 | 339 | <div id="textbox_busy_true" role="textbox" aria-busy="true"></div> |
michael@0 | 340 | <div id="textbox_busy_error" role="textbox" aria-busy="error"></div> |
michael@0 | 341 | |
michael@0 | 342 | <div id="combobox" role="combobox">combobox</div> |
michael@0 | 343 | <div id="combobox_expanded" role="combobox" |
michael@0 | 344 | aria-expanded="true">combobox</div> |
michael@0 | 345 | |
michael@0 | 346 | <input type="checkbox" id="check1" value="I agree" checked="true"/> |
michael@0 | 347 | |
michael@0 | 348 | <div id="aria_checked_checkbox" role="checkbox" aria-checked="true"> |
michael@0 | 349 | I agree |
michael@0 | 350 | </div> |
michael@0 | 351 | |
michael@0 | 352 | <div id="aria_mixed_checkbox" role="checkbox" aria-checked="mixed"> |
michael@0 | 353 | I might agree |
michael@0 | 354 | </div> |
michael@0 | 355 | <div id="aria_multiline_textbox" role="textbox" aria-multiline="true"></div> |
michael@0 | 356 | <div id="aria_multiselectable_listbox" role="listbox" aria-multiselectable="true"></div> |
michael@0 | 357 | <div id="aria_pressed_button" role="button" aria-pressed="true">Button</div> |
michael@0 | 358 | <button id="aria_pressed_native_button" aria-pressed="true">Button</button> |
michael@0 | 359 | |
michael@0 | 360 | <div id="aria_readonly_textbox" |
michael@0 | 361 | role="textbox" aria-readonly="true">This text should be readonly</div> |
michael@0 | 362 | |
michael@0 | 363 | <div id="aria_grid_default" role="grid"> |
michael@0 | 364 | <div role="row"> |
michael@0 | 365 | <div id="aria_grid_default_colheader_readonly" |
michael@0 | 366 | role="columnheader" aria-readonly="true">colheader1</div> |
michael@0 | 367 | <div id="aria_grid_default_colheader_inherited" |
michael@0 | 368 | role="columnheader">colheader2</div> |
michael@0 | 369 | </div> |
michael@0 | 370 | <div role="row"> |
michael@0 | 371 | <div id="aria_grid_default_rowheader_readonly" |
michael@0 | 372 | role="rowheader" aria-readonly="true">rowheader1</div> |
michael@0 | 373 | <div id="aria_grid_default_rowheader_inherited" |
michael@0 | 374 | role="rowheader">rowheader2</div> |
michael@0 | 375 | </div> |
michael@0 | 376 | <div role="row"> |
michael@0 | 377 | <div id="aria_grid_default_cell_readonly" |
michael@0 | 378 | role="gridcell" aria-readonly="true">gridcell1</div> |
michael@0 | 379 | <div id="aria_grid_default_cell_inherited" |
michael@0 | 380 | role="gridcell">gridcell2</div> |
michael@0 | 381 | </div> |
michael@0 | 382 | </div> |
michael@0 | 383 | |
michael@0 | 384 | <div id="aria_grid_readonly" role="grid" aria-readonly="true"> |
michael@0 | 385 | <div role="row"> |
michael@0 | 386 | <div id="aria_grid_readonly_colheader_editable" |
michael@0 | 387 | role="columnheader" aria-readonly="false">colheader1</div> |
michael@0 | 388 | <div id="aria_grid_readonly_colheader_inherited" |
michael@0 | 389 | role="columnheader">colheader2</div> |
michael@0 | 390 | </div> |
michael@0 | 391 | <div role="row"> |
michael@0 | 392 | <div id="aria_grid_readonly_rowheader_editable" |
michael@0 | 393 | role="rowheader" aria-readonly="false">rowheader1</div> |
michael@0 | 394 | <div id="aria_grid_readonly_rowheader_inherited" |
michael@0 | 395 | role="rowheader">rowheader2</div> |
michael@0 | 396 | </div> |
michael@0 | 397 | <div role="row"> |
michael@0 | 398 | <div id="aria_grid_readonly_cell_editable" |
michael@0 | 399 | role="gridcell" aria-readonly="false">gridcell1</div> |
michael@0 | 400 | <div id="aria_grid_readonly_cell_inherited" |
michael@0 | 401 | role="gridcell">gridcell2</div> |
michael@0 | 402 | </div> |
michael@0 | 403 | </div> |
michael@0 | 404 | |
michael@0 | 405 | <div id="aria_treegrid_default" role="grid"> |
michael@0 | 406 | <div role="row"> |
michael@0 | 407 | <div id="aria_treegrid_default_colheader_readonly" |
michael@0 | 408 | role="columnheader" aria-readonly="true">colheader1</div> |
michael@0 | 409 | <div id="aria_treegrid_default_colheader_inherited" |
michael@0 | 410 | role="columnheader">colheader2</div> |
michael@0 | 411 | </div> |
michael@0 | 412 | <div role="row"> |
michael@0 | 413 | <div id="aria_treegrid_default_rowheader_readonly" |
michael@0 | 414 | role="rowheader" aria-readonly="true">rowheader1</div> |
michael@0 | 415 | <div id="aria_treegrid_default_rowheader_inherited" |
michael@0 | 416 | role="rowheader">rowheader2</div> |
michael@0 | 417 | </div> |
michael@0 | 418 | <div role="row"> |
michael@0 | 419 | <div id="aria_treegrid_default_cell_readonly" |
michael@0 | 420 | role="gridcell" aria-readonly="true">gridcell1</div> |
michael@0 | 421 | <div id="aria_treegrid_default_cell_inherited" |
michael@0 | 422 | role="gridcell">gridcell2</div> |
michael@0 | 423 | </div> |
michael@0 | 424 | </div> |
michael@0 | 425 | |
michael@0 | 426 | <div id="aria_treegrid_readonly" role="grid" aria-readonly="true"> |
michael@0 | 427 | <div role="row"> |
michael@0 | 428 | <div id="aria_treegrid_readonly_colheader_editable" |
michael@0 | 429 | role="columnheader" aria-readonly="false">colheader1</div> |
michael@0 | 430 | <div id="aria_treegrid_readonly_colheader_inherited" |
michael@0 | 431 | role="columnheader">colheader2</div> |
michael@0 | 432 | </div> |
michael@0 | 433 | <div role="row"> |
michael@0 | 434 | <div id="aria_treegrid_readonly_rowheader_editable" |
michael@0 | 435 | role="rowheader" aria-readonly="false">rowheader1</div> |
michael@0 | 436 | <div id="aria_treegrid_readonly_rowheader_inherited" |
michael@0 | 437 | role="rowheader">rowheader2</div> |
michael@0 | 438 | </div> |
michael@0 | 439 | <div role="row"> |
michael@0 | 440 | <div id="aria_treegrid_readonly_cell_editable" |
michael@0 | 441 | role="gridcell" aria-readonly="false">gridcell1</div> |
michael@0 | 442 | <div id="aria_treegrid_readonly_cell_inherited" |
michael@0 | 443 | role="gridcell">gridcell2</div> |
michael@0 | 444 | </div> |
michael@0 | 445 | </div> |
michael@0 | 446 | |
michael@0 | 447 | <div role="listbox"> |
michael@0 | 448 | <div id="aria_selectable_listitem" role="option" aria-selected="true">Item1</div> |
michael@0 | 449 | </div> |
michael@0 | 450 | |
michael@0 | 451 | <!-- Test that aria-disabled state gets propagated to all descendants --> |
michael@0 | 452 | <div id="group" role="group" aria-disabled="true"> |
michael@0 | 453 | <button>hi</button> |
michael@0 | 454 | <div tabindex="0" role="listbox" aria-activedescendant="item1"> |
michael@0 | 455 | <div role="option" id="item1">Item 1</div> |
michael@0 | 456 | <div role="option" id="item2">Item 2</div> |
michael@0 | 457 | <div role="option" id="item3">Item 3</div> |
michael@0 | 458 | <div role="option" id="item4">Item 4</div> |
michael@0 | 459 | </div> |
michael@0 | 460 | <div role="slider" tabindex="0">A slider</div> |
michael@0 | 461 | </div> |
michael@0 | 462 | |
michael@0 | 463 | <!-- Test active state --> |
michael@0 | 464 | <div id="as_listbox" tabindex="0" role="listbox" |
michael@0 | 465 | aria-activedescendant="as_item1"> |
michael@0 | 466 | <div role="option" id="as_item1">Item 1</div> |
michael@0 | 467 | <div role="option" id="as_item2">Item 2</div> |
michael@0 | 468 | </div> |
michael@0 | 469 | |
michael@0 | 470 | <!-- universal ARIA properties should be inherited by text field of file input --> |
michael@0 | 471 | <input type="file" id="fileinput" |
michael@0 | 472 | aria-busy="true" |
michael@0 | 473 | aria-disabled="true" |
michael@0 | 474 | aria-required="true" |
michael@0 | 475 | aria-haspopup="true" |
michael@0 | 476 | aria-invalid="true"> |
michael@0 | 477 | |
michael@0 | 478 | <div id="offscreen_log" role="log" class="offscreen"> |
michael@0 | 479 | <div id="aria_offscreen_textbox" role="textbox" aria-readonly="true">This text should be offscreen</div> |
michael@0 | 480 | </div> |
michael@0 | 481 | |
michael@0 | 482 | <a id="aria_menuitem_link" role="menuitem" href="foo">menuitem</a> |
michael@0 | 483 | <a id="aria_button_link" role="button" href="foo">button</a> |
michael@0 | 484 | <a id="aria_checkbox_link" role="checkbox" href="foo">checkbox</a> |
michael@0 | 485 | |
michael@0 | 486 | <!-- strange edge case: please don't do this in the wild --> |
michael@0 | 487 | <a id="aria_link_link" role="link" href="foo">link</a> |
michael@0 | 488 | <a id="aria_link_anchor" role="link" name="link_anchor">link</a> |
michael@0 | 489 | |
michael@0 | 490 | <!-- landmarks: links --> |
michael@0 | 491 | <a id="aria_application_link" role="application" href="foo">app</a> |
michael@0 | 492 | <a id="aria_main_link" role="main" href="foo">main</a> |
michael@0 | 493 | <a id="aria_navigation_link" role="navigation" href="foo">nav</a> |
michael@0 | 494 | |
michael@0 | 495 | <!-- landmarks: anchors --> |
michael@0 | 496 | <a id="aria_application_anchor" role="application" name="app_anchor">app</a> |
michael@0 | 497 | <a id="aria_main_anchor" role="main" name="main_anchor">main</a> |
michael@0 | 498 | <a id="aria_navigation_anchor" role="navigation" name="nav_anchor">nav</a> |
michael@0 | 499 | |
michael@0 | 500 | <!-- aria-orientation --> |
michael@0 | 501 | <div id="aria_scrollbar" role="scrollbar">scrollbar</div> |
michael@0 | 502 | <div id="aria_hscrollbar" role="scrollbar" aria-orientation="horizontal">horizontal scrollbar</div> |
michael@0 | 503 | <div id="aria_vscrollbar" role="scrollbar" aria-orientation="vertical">vertical scrollbar</div> |
michael@0 | 504 | <div id="aria_separator" role="separator">separator</div> |
michael@0 | 505 | <div id="aria_hseparator" role="separator" aria-orientation="horizontal">horizontal separator</div> |
michael@0 | 506 | <div id="aria_vseparator" role="separator" aria-orientation="vertical">vertical separator</div> |
michael@0 | 507 | <div id="aria_slider" role="slider">slider</div> |
michael@0 | 508 | <div id="aria_hslider" role="slider" aria-orientation="horizontal">horizontal slider</div> |
michael@0 | 509 | <div id="aria_vslider" role="slider" aria-orientation="vertical">vertical slider</div> |
michael@0 | 510 | |
michael@0 | 511 | <!-- indeterminate ARIA progressbars should expose mixed state --> |
michael@0 | 512 | <div id="aria_progressbar" role="progressbar"></div> |
michael@0 | 513 | <div id="aria_progressbar_valuenow" role="progressbar" aria-valuenow="1"></div> |
michael@0 | 514 | <div id="aria_progressbar_valuetext" role="progressbar" aria-valuetext="value"></div> |
michael@0 | 515 | |
michael@0 | 516 | <!-- ARIA select widget should expose focusable state regardless the way they manage its children --> |
michael@0 | 517 | <div id="aria_listbox" role="listbox"> |
michael@0 | 518 | <div role="option" tabindex="0">A</div> |
michael@0 | 519 | <div role="option" tabindex="0">a</div> |
michael@0 | 520 | </div> |
michael@0 | 521 | <div id="aria_grid" role="grid"> |
michael@0 | 522 | <div role="row"><div role="gridcell" tabindex="0">B</div></div></div> |
michael@0 | 523 | <div role="row"><div role="gridcell" tabindex="0">b</div></div></div> |
michael@0 | 524 | <div id="aria_tree" role="tree"> |
michael@0 | 525 | <div role="treeitem" tabindex="0">C</div> |
michael@0 | 526 | <div role="treeitem" tabindex="0">c</div> |
michael@0 | 527 | </div> |
michael@0 | 528 | <div id="aria_treegrid" role="treegrid"> |
michael@0 | 529 | <div role="row"><div role="gridcell" tabindex="0">D</div></div> |
michael@0 | 530 | <div role="row"><div role="gridcell" tabindex="0">d</div></div> |
michael@0 | 531 | </div> |
michael@0 | 532 | <div id="aria_listbox_disabled" role="listbox" aria-disabled="true"> |
michael@0 | 533 | <div role="option">E</div> |
michael@0 | 534 | <div role="option">e</div> |
michael@0 | 535 | </div> |
michael@0 | 536 | <div id="aria_grid_disabled" role="grid" aria-disabled="true"> |
michael@0 | 537 | <div role="row"><div role="gridcell">F</div></div> |
michael@0 | 538 | <div role="row"><div role="gridcell">f</div></div> |
michael@0 | 539 | </div> |
michael@0 | 540 | <div id="aria_tree_disabled" role="tree" aria-disabled="true"> |
michael@0 | 541 | <div role="treeitem">G</div> |
michael@0 | 542 | <div role="treeitem">g</div> |
michael@0 | 543 | </div> |
michael@0 | 544 | <div id="aria_treegrid_disabled" role="treegrid" aria-disabled="true"> |
michael@0 | 545 | <div role="row"><div role="gridcell">H</div></div> |
michael@0 | 546 | <div role="row"><div role="gridcell">h</div></div> |
michael@0 | 547 | </div> |
michael@0 | 548 | |
michael@0 | 549 | </body> |
michael@0 | 550 | </html> |