| <!DOCTYPE html> |
| <!-- |
| @BLINK-ALLOW:focus* |
| @BLINK-ALLOW:setSize* |
| @BLINK-ALLOW:posInSet* |
| @BLINK-ALLOW:haspopup* |
| @BLINK-ALLOW:expanded |
| @MAC-ALLOW:AXRoleDescription=* |
| @WIN-ALLOW:HASPOPUP |
| @WIN-ALLOW:haspopup* |
| @WIN-ALLOW:ispopup* |
| @WIN-ALLOW:readonly* |
| @WIN-ALLOW:MULTISELECTABLE |
| @WIN-ALLOW:EXTSELECTABLE |
| @WIN-ALLOW:SELECT* |
| @AURALINUX-ALLOW:haspopup* |
| @AURALINUX-ALLOW:isspopup* |
| @AURALINUX-ALLOW:posinset* |
| @AURALINUX-ALLOW:setsize* |
| @AURALINUX-ALLOW:expand* |
| @AURALINUX-ALLOW:required |
| @DEFAULT-ACTION-ON:forbidden select |
| @EXECUTE-AND-WAIT-FOR:removeForbidden() |
| @EXECUTE-AND-WAIT-FOR:addForbidden() |
| |
| This file tests the behavior of switching the mapping of the select popup from |
| MenuListPopup to dialog in the case that there are forbidden interactive |
| elements included in the picker. We are removing and re-adding the forbidden |
| button here in order to test that the invalidation works. |
| --> |
| |
| <style> |
| select, ::picker(select) { |
| appearance: base-select; |
| } |
| </style> |
| |
| <select aria-label="forbidden select"> |
| <button>invoker button</button> |
| <option>one</option> |
| <option>two</option> |
| <button id=forbidden>forbidden button</button> |
| </select> |
| |
| <div id=output></div> |
| |
| <script> |
| const select = document.querySelector('select'); |
| const forbiddenButton = document.getElementById('forbidden'); |
| const output = document.getElementById('output'); |
| |
| function removeForbidden() { |
| (async () => { |
| await new Promise(requestAnimationFrame); |
| await new Promise(requestAnimationFrame); |
| forbiddenButton.remove(); |
| await new Promise(requestAnimationFrame); |
| await new Promise(requestAnimationFrame); |
| output.insertAdjacentHTML('beforeend', '<div>removeForbidden</div>'); |
| })(); |
| return 'removeForbidden'; |
| } |
| |
| function addForbidden() { |
| (async () => { |
| select.appendChild(forbiddenButton); |
| await new Promise(requestAnimationFrame); |
| await new Promise(requestAnimationFrame); |
| output.insertAdjacentHTML('beforeend', '<div>addForbidden</div>'); |
| })(); |
| return 'addForbidden'; |
| } |
| </script> |