From 0e49ddc62d721349507339fb0a55156ea4455f33 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Mon, 18 Aug 2025 13:16:05 -0700 Subject: [PATCH 1/3] a11y: add single main landmark and basic Axe accessibility test; add axe-playwright-python dev dep (#2677) --- app/frontend/src/pages/layout/Layout.module.css | 6 ++++++ app/frontend/src/pages/layout/Layout.tsx | 4 +++- requirements-dev.txt | 1 + tests/e2e.py | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/frontend/src/pages/layout/Layout.module.css b/app/frontend/src/pages/layout/Layout.module.css index 4854140247..4f53c0177e 100644 --- a/app/frontend/src/pages/layout/Layout.module.css +++ b/app/frontend/src/pages/layout/Layout.module.css @@ -4,6 +4,12 @@ height: 100%; } +.main { + display: flex; + flex: 1; + min-height: 0; /* allow inner scroll areas to work inside flex container */ +} + .header { background-color: #222222; color: #f2f2f2; diff --git a/app/frontend/src/pages/layout/Layout.tsx b/app/frontend/src/pages/layout/Layout.tsx index 2086129292..18ee025eed 100644 --- a/app/frontend/src/pages/layout/Layout.tsx +++ b/app/frontend/src/pages/layout/Layout.tsx @@ -75,7 +75,9 @@ const Layout = () => { - +
+ +
); }; diff --git a/requirements-dev.txt b/requirements-dev.txt index c035649f27..cece1adac8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,3 +12,4 @@ pytest-snapshot pre-commit pip-tools mypy==1.14.1 +axe-playwright-python diff --git a/tests/e2e.py b/tests/e2e.py index adb5805e07..5d4252d00b 100644 --- a/tests/e2e.py +++ b/tests/e2e.py @@ -10,6 +10,7 @@ import pytest import requests import uvicorn +from axe_playwright_python.sync_playwright import Axe from playwright.sync_api import Page, Route, expect import app @@ -110,6 +111,10 @@ def handle(route: Route): expect(page.get_by_role("button", name="Clear chat")).to_be_disabled() expect(page.get_by_role("button", name="Developer settings")).to_be_enabled() + # Check accessibility of page in initial state + results = Axe().run(page) + assert results.violations_count == 0, results.generate_report() + # Ask a question and wait for the message to appear page.get_by_placeholder("Type a new question (e.g. does my plan cover annual eye exams?)").click() page.get_by_placeholder("Type a new question (e.g. does my plan cover annual eye exams?)").fill( From b203c77b264c191dcca28f72da1044375d4d3331 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Mon, 18 Aug 2025 13:23:55 -0700 Subject: [PATCH 2/3] Update fixer mode with PR instructions --- .github/chatmodes/fixer.chatmode.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/chatmodes/fixer.chatmode.md b/.github/chatmodes/fixer.chatmode.md index 0e35b6450b..e309949f6e 100644 --- a/.github/chatmodes/fixer.chatmode.md +++ b/.github/chatmodes/fixer.chatmode.md @@ -1,7 +1,7 @@ --- description: 'Fix and verify issues in app' model: GPT-5 (Preview) -tools: ['extensions', 'codebase', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'runTests', 'runCommands', 'runTasks', 'editFiles', 'runNotebooks', 'search', 'new', 'get_issue', 'get_issue_comments', 'get-library-docs', 'playwright', 'pylance mcp server'] +tools: ['extensions', 'codebase', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'runTests', 'runCommands', 'runTasks', 'editFiles', 'runNotebooks', 'search', 'new', 'create_pull_request', 'get_issue', 'get_issue_comments', 'get-library-docs', 'playwright', 'pylance mcp server'] --- # Fixer Mode Instructions @@ -25,3 +25,8 @@ You MUST check task output readiness before debugging, testing, or declaring wor - Backend: Quart was started with --reload; Python changes trigger an automatic restart. - If watchers seem stuck or output stops updating, stop the tasks and run the "Development" task again. - To interact with a running application, use the Playwright MCP server + +## Committing the change + +When change is complete, offer to make a new branch, git commit, and pull request. +Make sure the PR follows the PULL_REQUEST_TEMPLATE.md format, with all sections filled out and appropriate checkboxes checked. From eb79064f67fc2cb5d8c1f2589b0c018d2dd9f5bd Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Tue, 19 Aug 2025 09:11:44 -0700 Subject: [PATCH 3/3] Update app/frontend/src/pages/layout/Layout.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/frontend/src/pages/layout/Layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/frontend/src/pages/layout/Layout.tsx b/app/frontend/src/pages/layout/Layout.tsx index 18ee025eed..1bf90f9c0a 100644 --- a/app/frontend/src/pages/layout/Layout.tsx +++ b/app/frontend/src/pages/layout/Layout.tsx @@ -75,7 +75,7 @@ const Layout = () => { -
+