From c90a7a19a59bb7dd65b50b88930b762cb6b834fe Mon Sep 17 00:00:00 2001 From: Collin <89503725+CollinOS@users.noreply.github.com> Date: Mon, 1 Jun 2026 23:41:25 -0400 Subject: [PATCH] Add dialog accessibility semantics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screen readers got no signal that a dialog opened — not one modal carried role="dialog" — and several close buttons had no accessible name. - The 6 static tool windows (Brain, Theme, Prompt, Rename session, Cookbook, Settings) now carry role="dialog" + an accessible name. They are dockable, tiling windows, so they are non-modal dialogs (intentionally no aria-modal). - The four unlabelled close buttons (theme, prompt, cookbook, settings) get an aria-label so they no longer read as just "heavy multiplication x". - styledConfirm / styledPrompt ARE blocking modals: they get role="dialog" + aria-modal="true" + aria-labelledby/aria-describedby, and now manage focus — restore focus to the triggering element on close and trap Tab within the dialog (they already moved focus in on open). tests/test_dialog_aria.py pins the roles, labels, and focus management. --- static/index.html | 20 +++++++------- static/js/ui.js | 26 +++++++++++++++--- tests/test_dialog_aria.py | 56 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 tests/test_dialog_aria.py diff --git a/static/index.html b/static/index.html index 7709ad2..ca93929 100644 --- a/static/index.html +++ b/static/index.html @@ -242,7 +242,7 @@