[a11y] Focus visibility audit — buttons/nav/wallet-rows have no visible focus indicator (WCAG 2.4.7) #144
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@totdking — visual / a11y finding from source-level audit, assigning to you. broader pattern across the dapp where interactive elements lack visible focus indicators. extends DEX visual QA umbrella #133. relates to WCAG 2.4.7 (Focus Visible, Level AA).
Scope
Source audit found that inputs ship explicit focus rings, but most styled buttons and nav links do NOT. Additionally,
:focus-visibleis not used anywhere in the codebase (zero hits inindex.css) — all explicit focus rules use:focus, so mouse users see the ring after click as well as keyboard users. Industry standard is:focus-visibleso the ring renders only on keyboard focus.HIGH — buttons/links missing explicit focus styling
Each of these has
:hoverrules but NO:focus/:focus-visiblerule. Browser default applies (often a thin/dotted ring or none, depending on browser preflight reset).frontend-dapp/src/index.css:157-166.btn-primary(only:hoverat line 168)frontend-dapp/src/index.css:173-188.btn-muted(same pattern)frontend-dapp/src/index.css:190-202.btn-cta(same pattern)frontend-dapp/src/index.css:630-669.app-nav-link,.app-more-trigger,.app-mobile-link,.app-mobile-more,.app-menu-link,.app-footer-theme-button,.network-badge,.wallet-trigger(all:hoveronly at:658-665)frontend-dapp/src/index.css:929-949.wallet-option-card— connect modal wallet rows (only:hover)frontend-dapp/src/index.css:456-476.tab-neo*family — verify; similarly hover-onlyHIGH — input with focus:outline-none and no substitute
frontend-dapp/src/pages/SwapPage.tsx:797:The primary You-Pay amount input strips the browser focus ring without supplying a replacement. Keyboard-only users get no visible focus indicator on the page's MOST IMPORTANT field. This is also the same input flagged in DEX #143 (form labels) for missing label association — same input has two a11y gaps.
POLISH —
:focusused where:focus-visiblewould be cleanerCurrently applies the focus ring on every focus event including mouse click. Switch to
:focus-visibleso the ring only renders on keyboard focus:index.css:230-236.input-neo:focusindex.css:250-256.select-neo:focusindex.css:281-287.token-select-trigger:focusHow to verify on local stack
.input-neo:focusring (works today)document.activeElementpolling in console — different elements gain focus on each Tab keystroke even though no visual indicator appearsThis is a WCAG 2.4.7 violation — focus DOES move (so navigation works) but is NOT visible (so users can't see where they are).
Reference patterns (correct sites — use as the model when fixing)
.input-neo:focusatindex.css:230-236— the existing focus styling on form inputs is the right shape. Apply the same ring (or visually-similar) to.btn-*,.app-nav-link*,.wallet-trigger,.wallet-option-card,.tab-neo*.Suggested fix shape
Add
:focus-visiblerules to the missing classes:(Use whatever visual rhythm matches
.input-neo:focus's existing ring color/offset.)For the SwapPage You-Pay input at
SwapPage.tsx:797, dropfocus:outline-none— let the input inherit a default focus ring, OR replace with a Tailwindfocus-visible:utility that supplies a visible alternative.For the existing
:focusrules on.input-neo,.select-neo,.token-select-trigger, migrate to:focus-visibleso mouse users don't see the ring after click (purely a polish, not a violation).Severity
P2 — WCAG 2.4.7 (Focus Visible, Level AA) violation on most interactive elements. Keyboard-only users cannot see where their focus currently sits. Compounds with #143 (form labels) — both gaps affect the same You-Pay input plus the dapp's primary CTAs.
Cross-reference
cc @PlasticDigits
assigned to @totdking
@Brouie Should not be assigned to totdking as this is a bugfix not a verification
unassigned @totdking
mentioned in issue #145
mentioned in issue #146
mentioned in commit
41dbd1f725Implemented (merged to
main)WCAG 2.4.7 focus visibility:
frontend-dapp/src/index.css::focus-visiblerings aligned with.input-neo(`--focus-ring` / `color-mix`) for.btn-primary/.btn-muted/.btn-primary.btn-cta, shell nav (.app-nav-link, More/mobile/footer triggers,.network-badge),.wallet-trigger(+.wallet-trigger-connected), active-nav stacking,.app-menu-link/.wallet-menu-item,.tab-neo*,.wallet-option-card..input-neo,.select-neo,.token-select-triggermigrated from:focus→:focus-visible.swap-io-amount-input; removed Tailwindfocus:outline-none; ring via CSS beside.swap-io-stack.Docs:
docs/frontend.md§ Keyboard focus visibility; agent playbookskills/AGENTS_FRONTEND_A11Y_FOCUS.md; cross-link fromskills/AGENTS_FRONTEND_RESPONSIVE_HEADER.md.Verification checklist (please confirm locally):
:focus-visiblesemantics (rings should skew keyboard-forward).Requested verification: @brouie — issue stays open until you sign off.
Refs: merge on
main(GitLaborigin/main). Related: #143 (labels / same input).Verification complete (local QA + browser MCP)
Verified WCAG 2.4.7 focus visibility on
main@7f37096— no additional code changes required; implementation from the prior merge satisfies the issue.Stack
.env.localfrom QA)Checklist (issue +
docs/frontend.md§ Keyboard focus visibility):focus-visibleforced-pseudo audit on live UI:a.app-nav-link— 2px--focus-ringouter ring stacked with active nav shadow ✓.wallet-option-card(Connect Wallet modal) — 2px ring ✓ (screenshot: Simulated Wallet row bordered).swap-io-amount-input— 2px ring ✓ (verified earlier in session before chain redeploy):focus-visiblerules loaded; required selectors present (.btn-primary,.btn-muted, shell.app-*,.wallet-trigger,.tab-neo*,.token-select-trigger,.input-neo,.swap-io-amount-input,.wallet-option-card). Nofocus:outline-nonein frontend.:focus-visibleis false and no outer ring (keyboard-only emphasis) ✓swap-io-amount-inputclass; Tailwindfocus:outline-noneremoved ✓Notes
.token-select-trigger:focus { outline: none; }remains intentionally — ring color applied via:focus-visibleonly (GitLab #181 footprint stability)..select-neo:focus-visibleexists inindex.css; no live<select class="select-neo">on Swap route today.Closing as verified.
mentioned in issue #214
mentioned in issue #337
mentioned in issue #528
mentioned in issue #541
mentioned in issue #659
mentioned in issue #665
mentioned in issue #671
marked as related to #671
mentioned in issue #672
mentioned in issue #693