| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <script src="../../resources/js-test.js"></script> | |
| <script src="../../resources/accessibility-helper.js"></script> | |
| <custom-grid id="grid-1"></custom-grid> | |
| <custom-grid id="grid-2" aria-multiselectable="false"></custom-grid> | |
| <script> | |
| customElements.define('custom-grid', class CustomGrid extends HTMLElement { | |
| constructor() | |
| { | |
| super(); | |
| const internals = this.attachInternals(); | |
| internals.role = 'grid'; | |
| internals.ariaMultiSelectable = 'true'; | |
| } | |
| }); | |
| description("This tests that aria fallback roles work correctly."); | |
| if (!window.accessibilityController) | |
| debug('This test requires accessibilityController'); | |
| else { | |
| shouldBe('accessibilityController.accessibleElementById("grid-1").isMultiSelectable', 'true'); | |
| shouldBe('accessibilityController.accessibleElementById("grid-2").isMultiSelectable', 'false'); | |
| } | |
| </script> | |
| </body> | |
| </html> |