Skip to content

Dashboard: accessible sign-in error state (aria-invalid, aria-describedby, focus return) - #917

Open
krypto-boi wants to merge 4 commits into
StellarGateLabs:mainfrom
krypto-boi:drips/824-825-826-827
Open

krypto-boi wants to merge 4 commits into
StellarGateLabs:mainfrom
krypto-boi:drips/824-825-826-827

Conversation

@krypto-boi

Copy link
Copy Markdown

Summary

Dashboard: accessible sign-in error state (aria-invalid, aria-describedby, focus return)

What was solved

#824 — Dashboard: accessible sign-in errors

Make dashboard sign-in errors accessible by wiring the key input to its error message via aria-invalid and aria-describedby, and returning focus to the input when sign-in fails. This is a focused front-end change in the dashboard's sign-in flow, likely touching static/dashboard.html (markup for input/error), static/dashboard.js (error handling and focus management), and possibly static/dom.js or static/keys.js if helpers live there. Must not leak API keys into URLs, logs, or console output, and must keep tests/dashboard_asset_tests.rs passing.

Addressed:

  • Changed: static/dashboard.html, static/dom.js, static/keys.js
  • Set aria-invalid on the key input when sign-in fails
  • Set aria-describedby on the key input pointing to the error element
  • Move focus back to the key input on sign-in failure

#825 — Dashboard: mock API fixture for frontend development

Add a dev-only mock API server for dashboard frontend development that serves the static/ assets plus canned JSON responses for /v1/payments, the summary endpoint, webhooks, /ready and /, with fixtures covering every payment status and a merchant-controlled XSS payload, plus documentation in the dashboard dev notes. Must not leak API keys into URLs, logs, or console output, and must keep tests/dashboard_asset_tests.rs passing.

Addressed:

#826 — Dashboard: visual regression screenshots with Playwright

Add Playwright-based visual regression coverage for the dashboard: snapshot gate, table, drawer, and empty states in light/dark at desktop and mobile widths, store baselines in the repo, and fail CI on diffs above a threshold. This extends the existing e2e Playwright setup (e2e/playwright.config.js, e2e/tests/*.spec.js) and the dashboard CI workflow, while preserving the no-API-key-leak guarantee and keeping tests/dashboard_asset_tests.rs passing.

Addressed:

  • Changed: e2e/playwright.config.js, e2e/tests/dashboard.spec.js
  • Snapshot the gate, table, drawer, and empty states in light and dark themes at desktop and mobile widths
  • Store visual baselines in the repo
  • Fail CI on visual diffs above a configured threshold

#827 — Dashboard: formatting check for HTML/CSS/JS

Add Prettier formatting enforcement for the dashboard frontend: a Prettier config scoped to static/, a CI formatting check alongside the existing lint job, and formatting of existing static/ files. The issue is part of a batch (70/70) and depends on the lint job from #668. Acceptance criteria require cross-browser/mobile compatibility, no API key leakage in URLs/logs/console, and passing tests/dashboard_asset_tests.rs.

Addressed:

  • Changed: .github/workflows/dashboard.yml, .github/workflows/ci.yml
  • Add a Prettier config scoped to static/ (e.g. .prettierrc plus .prettierignore or a scoped config)
  • Add a CI check next to the lint job (Add a dev-only JavaScript lint job to CI for the dashboard #668) that verifies formatting
  • Format existing static/ files (separate commit per issue, but edits must be formatting-only)

Changes

  • static/keys.js (modify)
  • e2e/playwright.config.js (modify)
  • .github/workflows/ci.yml (modify)
  • static/dashboard.html (modify)
  • e2e/scripts/serve.mjs (modify)
  • e2e/tests/dashboard.spec.js (modify)
  • static/dom.js (modify)
  • static/api.js (modify)
  • .github/workflows/dashboard.yml (modify)

Approach

  1. Dashboard: accessible sign-in errors #824 — Dashboard: accessible sign-in errors (Changed: static/dashboard.html, static/dom.js, static/keys.js)
  2. Dashboard: mock API fixture for frontend development #825 — Dashboard: mock API fixture for frontend development (Changed: e2e/scripts/serve.mjs, static/api.js)
  3. Dashboard: visual regression screenshots with Playwright #826 — Dashboard: visual regression screenshots with Playwright (Changed: e2e/playwright.config.js, e2e/tests/dashboard.spec.js)
  4. Dashboard: formatting check for HTML/CSS/JS #827 — Dashboard: formatting check for HTML/CSS/JS (Changed: .github/workflows/dashboard.yml, .github/workflows/ci.yml)

Issues

Closes #824
Closes #825
Closes #826
Closes #827

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@krypto-boi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant