Skip to content

Accessibility fixes#621

Open
lawsie wants to merge 6 commits into
flipcomputing:mainfrom
lawsie:accessibility-fixes
Open

Accessibility fixes#621
lawsie wants to merge 6 commits into
flipcomputing:mainfrom
lawsie:accessibility-fixes

Conversation

@lawsie
Copy link
Copy Markdown
Contributor

@lawsie lawsie commented May 11, 2026

Summary

Small accessibility fixes for the keyboard accessibility UI based on feedback.

  • Moved accessibility.js file to the /accessibility folder and renamed it to keyboardui.js to be clearer
  • Add scope to keyboard shortcuts table to help screen readers
  • Make the UI behind the AreaManager overlay inert (helps screen readers)
  • Restore the previous focus if the user cancels the AreaManager menu without selecting an area

AI Usage

Claude Sonnet 4.6 used for advice and code fixes.

Summary by CodeRabbit

  • Accessibility Improvements
    • Enhanced keyboard navigation with improved focus management for menu overlays.
    • Added semantic markup to improve screen reader compatibility.
    • Optimized modal overlay behavior for keyboard interactions.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@lawsie has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 2 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9c87714-f028-4e73-9d0e-56b1f7e5bf6b

📥 Commits

Reviewing files that changed from the base of the PR and between 9eb0fda and e3d66a3.

📒 Files selected for processing (1)
  • accessibility/keyboardui.js
📝 Walkthrough

Walkthrough

Module reorganization consolidates keyboard UI exports (ShortcutsPanel, GizmoMenuManager) into accessibility/keyboardui.js, corrects internal imports from ../main/* paths, strengthens AreaManager overlay with focus management and inert attributes, adds semantic table header scope, and updates all consumers to import from the new location.

Changes

Keyboard UI Consolidation & Focus Management

Layer / File(s) Summary
Keyboard UI Module Core Changes
accessibility/keyboardui.js
Import paths corrected to ../main/*; AreaManager overlay hidden styling switches from className assignment to classList.add("hidden"); overlay toggle adds focus/inert management (records/restores focus, inerts background on show); ShortcutsPanel table group header gains scope="rowgroup".
Consumer Import Updates
main/main.js, ui/addmenu.js, ui/gizmos.js
ShortcutsPanel and GizmoMenuManager imports updated to source from ../accessibility/keyboardui.js instead of former paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • flipcomputing/flock#609: Import path consolidation directly depends on new InputManager/ContextManager exports introduced in this PR.
  • flipcomputing/flock#608: Both PRs modify ShortcutsPanel/GizmoMenuManager and AreaManager overlay focus/inert behavior in keyboard UI.
  • flipcomputing/flock#595: Original introduction of ShortcutsPanel component that is being relocated in this PR.

Poem

🐰 Keys and overlays find their proper home,
Focus flows like streams through the DOM,
Inert backgrounds fade from view,
Semantic headers guide the way true—
Consolidation brings clarity anew! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "Accessibility fixes" is generic and vague, using a non-descriptive term that doesn't convey specific information about the changeset. Consider using a more specific title that highlights the main change, such as "Reorganize accessibility module and improve keyboard UI" or reference a specific accessibility improvement.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@accessibility/keyboardui.js`:
- Around line 45-54: When toggling the overlay you currently force all
non-overlay body children to inert=true and later unconditionally set
inert=false; instead record each element's prior inert value when opening (e.g.
store a Map on the AreaManager instance like this._previousInertStates keyed by
element) and on close restore each element's inert to its saved boolean, then
clear the map; update the code around the overlay focus logic (references:
this.previousFocus and this.overlay) to save states before setting inert and to
restore them instead of blindly flipping them to false.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf167786-86f4-4265-9b7e-26944ec16b50

📥 Commits

Reviewing files that changed from the base of the PR and between f51576d and 9eb0fda.

📒 Files selected for processing (4)
  • accessibility/keyboardui.js
  • main/main.js
  • ui/addmenu.js
  • ui/gizmos.js

Comment thread accessibility/keyboardui.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant