| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="../resources/run-after-layout-and-paint.js"></script> |
| </head> |
| <body id="body"> |
| |
| <div id="element1" role="checkbox" aria-checked="mixed"></div> |
| <div id="element2" role="menuitemcheckbox" aria-checked="mixed"></div> |
| <div id="element3" role="radio" aria-checked="mixed"></div> |
| <div id="element4" role="menuitemradio" aria-checked="mixed"></div> |
| <!-- Switch specifically does not support mixed --> |
| <div id="element5" role="switch" aria-checked="mixed"></div> |
| |
| <input id="element6" type="checkbox" aria-checked="mixed" checked /> |
| <input id="element7" type="checkbox" aria-checked="mixed" /> |
| <input id="element8" type="radio" aria-checked="mixed" checked /> |
| <input id="element9" type="radio" aria-checked="mixed" /> |
| <input id="element10" type="button" aria-checked="mixed" /> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| test_after_layout_and_paint((t) => { |
| let roles = ["AXRole: AXCheckBox", |
| "AXRole: AXMenuItemCheckBox", |
| "AXRole: AXRadioButton", |
| "AXRole: AXMenuItemRadio", |
| "AXRole: AXSwitch", |
| "AXRole: AXCheckBox", |
| "AXRole: AXCheckBox", |
| "AXRole: AXRadioButton", |
| "AXRole: AXRadioButton", |
| "AXRole: AXButton"]; |
| let checked = ["mixed", |
| "mixed", |
| "mixed", |
| "mixed", |
| "true", |
| "mixed", |
| "mixed", |
| "mixed", |
| "mixed", |
| ""]; |
| |
| for (var i = 1; i <= 10; i++) { |
| var ax_object = accessibilityController.accessibleElementById("element" + i); |
| assert_equals(ax_object.role, roles[i - 1]); |
| assert_equals(ax_object.checked, checked[i - 1]); |
| } |
| }, "Check whether ARIA mixed state is reported properly"); |
| |
| </script> |
| |
| </body> |
| </html> |