/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; /* import-globals-from ../../mochitest/selectable.js */ // //////////////////////////////////////////////////////////////////////// // role="tablist" role="listbox" role="grid" role="tree" role="treegrid" addAccessibleTask( `
tab1
tab2
item1
item2
cell cell
cell cell
item1
item1.1
item2
cell cell
cell cell
cell cell
`, async function (browser, docAcc) { info( 'role="tablist" role="listbox" role="grid" role="tree" role="treegrid"' ); testSelectableSelection(findAccessibleChildByID(docAcc, "tablist"), []); testSelectableSelection(findAccessibleChildByID(docAcc, "listbox"), []); testSelectableSelection(findAccessibleChildByID(docAcc, "grid"), []); testSelectableSelection(findAccessibleChildByID(docAcc, "tree"), []); testSelectableSelection(findAccessibleChildByID(docAcc, "treegrid"), []); }, { chrome: true, topLevel: true, iframe: true, remoteIframe: true, } ); // //////////////////////////////////////////////////////////////////////// // role="tablist" aria-multiselectable addAccessibleTask( `
`, async function (browser, docAcc) { info('role="tablist" aria-multiselectable'); let tablist = findAccessibleChildByID(docAcc, "tablist", [ nsIAccessibleSelectable, ]); await testMultiSelectable(tablist, ["tab_multi1", "tab_multi2"]); }, { chrome: true, topLevel: true, iframe: true, remoteIframe: true, } ); // //////////////////////////////////////////////////////////////////////// // role="listbox" aria-multiselectable addAccessibleTask( `
item1
item2
`, async function (browser, docAcc) { info('role="listbox" aria-multiselectable'); let listbox = findAccessibleChildByID(docAcc, "listbox", [ nsIAccessibleSelectable, ]); await testMultiSelectable(listbox, ["listbox2_item1", "listbox2_item2"]); }, { chrome: true, topLevel: true, iframe: true, remoteIframe: true, } ); // //////////////////////////////////////////////////////////////////////// // role="grid" aria-multiselectable, selectable children in subtree addAccessibleTask( `
Entry # Date Expense
1 03/14/05 Conference Fee
`, async function (browser, docAcc) { info('role="grid" aria-multiselectable, selectable children in subtree'); let grid = findAccessibleChildByID(docAcc, "grid", [ nsIAccessibleSelectable, ]); await testMultiSelectable(grid, [ "grid_colhead1", "grid_colhead2", "grid_colhead3", "grid_rowhead", "grid_cell1", "grid_cell2", ]); }, { chrome: true, topLevel: true, iframe: true, remoteIframe: true, } );