Describe the improvement
Modals do not trap focus and do not restore focus on close:
- Settings modal at
apps/desktop/src/components/SettingsView.tsx:382-475 is a plain <div> (no role="dialog", no aria-modal, no aria-labelledby). Its Escape handler is attached to the div, which isn't focusable, so it never fires.
- Permission request dialog at
apps/desktop/src/addons/builtin.ai-assistant/AiChatComponent.tsx:775-804 has no ARIA role and no focus management.
Proposed change:
For each dialog:
- Apply
role="dialog" aria-modal="true" aria-labelledby="…title".
- Move focus to the first interactive element on open; restore focus to the trigger on close.
- Implement a focus trap (Tab/Shift+Tab cycle within the dialog).
- Attach the Escape listener to
document while the dialog is open.
Would you like to implement this improvement yourself by sending a PR?
Maybe
Describe the improvement
Modals do not trap focus and do not restore focus on close:
apps/desktop/src/components/SettingsView.tsx:382-475is a plain<div>(norole="dialog", noaria-modal, noaria-labelledby). Its Escape handler is attached to the div, which isn't focusable, so it never fires.apps/desktop/src/addons/builtin.ai-assistant/AiChatComponent.tsx:775-804has no ARIA role and no focus management.Proposed change:
For each dialog:
role="dialog" aria-modal="true" aria-labelledby="…title".documentwhile the dialog is open.Would you like to implement this improvement yourself by sending a PR?
Maybe