Fix keyboard behavior of the AI tools dock tabs and Escape
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- accessibility
Research direction
Start with public/site-shell.js around the tab setup, Escape handler, and setDockOpen(); compare the reference tabs in editor.mjs:358-412. Check the dock tabs and iframe markup, then verify arrow-key navigation, Tab order, Escape behavior with a page modal open, and focus returning to #nullAiToggle when the dock closes. An open linked pull request (#50) already tracks this work.
Written by the indexing model from the issue text.
Description
The AI dock built in public/site-shell.js is on every workspace page, and its keyboard behavior has three gaps.
- Tabs without the tab pattern. Line 62 gives the four buttons
role="tab"inside arole="tablist". But all four stay in the Tab order, arrow keys do nothing, and there is norole="tabpanel"/aria-controlslink to the iframes. The editor's reference tabs already do this right (editor.mjs:358-412). - Global Escape. Line 128 closes the dock on any Escape anywhere. On
/index.html, one Escape inside a template modal closes the modal and the dock together. - Lost focus. When the dock closes via Escape or "Hide",
setDockOpen()(135-149) setsdock.inert = truewhile focus may still be inside, so focus falls to<body>.
Fix direction: use a roving tabindex with Left/Right/Home/End in selectTool(), and give each tab and iframe an id plus aria-controls. Handle Escape only when focus is inside the dock and !event.defaultPrevented. Before closing, move focus to #nullAiToggle if the dock contains document.activeElement.
Done when arrow keys switch tools, Tab enters the tabs once, Escape in a page modal leaves the dock open, and closing the dock returns focus to the toggle.
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blixvip/NullMotion
-
accessibility help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
blixvip/NullMotion#47 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
blixvip/NullMotion#43 ·
-
accessibility good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
blixvip/NullMotion#42 ·
-
accessibility good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
blixvip/NullMotion#41 ·
-
accessibility good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
blixvip/NullMotion#40 ·
All issues in blixvip/NullMotion
Similar issues
-
文字サイズ最大で服薬タブの日付の見出しとカレンダータブの月の見出しが切れるPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bannzai/medicalarm#572 ·
Maintainers usually reply within 1 day
-
Disabled radio toggle button groups lose checked statePossibly taken @vladosskins178 claimed this today. Openbug confirmed css has-pr v6
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
a11y
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
italia/bootstrap-italia#2001 ·
Maintainers usually reply within 4 days
-
in triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day