browser_keyboard_shortcut.js (877B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 addAccessibleTask( 8 ` 9 <button id="btn1" accesskey="s">foo</button> 10 <div id="btn2" role="button" aria-keyshortcuts="Alt+Shift+f">bar</div> 11 12 `, 13 async function () { 14 is( 15 await runPython(` 16 global doc 17 doc = getDocIa2() 18 btn = findIa2ByDomId(doc, "btn1") 19 return btn.accKeyboardShortcut(CHILDID_SELF) 20 `), 21 "Alt+Shift+s", 22 "btn1 has correct keyboard shortcut" 23 ); 24 25 is( 26 await runPython(` 27 btn = findIa2ByDomId(doc, "btn2") 28 return btn.accKeyboardShortcut(CHILDID_SELF) 29 `), 30 "Alt+Shift+f", 31 "btn2 has correct keyboard shortcut" 32 ); 33 }, 34 { chrome: true, topLevel: true } 35 );