File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,22 +59,11 @@ The accessibility tree exposes the heading hierarchy and semantic landmarks.
5959
6060### 4. Focus & Keyboard Navigation
6161
62- Testing " keyboard traps" and proper focus management without visual feedback relies on precise scripting .
62+ Testing " keyboard traps" and proper focus management without visual feedback relies on tracking the focused element .
6363
64- 1. Use ` evaluate_script` to find the currently focused element:
65- ` ` ` javascript
66- () => {
67- const active = document.activeElement;
68- return {
69- tag: active.tagName,
70- id: active.id,
71- className: active.className,
72- text: active.innerText,
73- };
74- };
75- ` ` `
76- 2. Use the ` press_key` tool with ` "Tab"` or ` "Shift+Tab"` to move focus.
77- 3. Re- run the script in step 1 to ensure focus moved to the expected next interactive element.
64+ 1. Use the ` press_key` tool with ` "Tab"` or ` "Shift+Tab"` to move focus.
65+ 2. Use ` take_snapshot` to capture the updated accessibility tree.
66+ 3. Locate the element marked as focused in the snapshot to verify focus moved to the expected interactive element.
78674. If a modal opens, focus must move into the modal and " trap" within it until closed.
7968
8069### 5. Tap Targets and Visuals
You can’t perform that action at this time.
0 commit comments