aave / aave/interface

bug: swap token controls are not fully keyboard and screen-reader accessible

Open
#3,100 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
536
Forks
496
Avg merge
1d 8h
Merged PRs (30d)
9

Description

Describe the bug

The shared swap UI contains several accessibility problems in the token/amount controls. The highest-impact one is in the token picker: the "Recently used & Popular" token choices are rendered as clickable Box elements with no native button semantics, tabIndex, or keyboard handler, so keyboard-only users cannot focus or activate those choices.

The same shared swap flow also contains icon-only controls without accessible names (including the input/output asset switch button and clear buttons), and the amount inputs use the same generic accessible name (amount input) for both sides of flows where both inputs are editable.

This is in the shared swap components, so it can affect multiple Aave markets and swap variants rather than one isolated screen. It is reproducible on a swap-enabled market such as Ethereum V3.

Relevant WCAG 2.2 criteria include 2.1.1 (Keyboard) and 4.1.2 (Name, Role, Value).

To Reproduce

  1. Open a swap flow on a swap-enabled market such as Ethereum V3.
  2. Open the token selector.
  3. If "Recently used & Popular" choices are present, navigate through the selector using only Tab / Shift+Tab.
  4. The popular token choices are skipped because they are click-only Box elements.
  5. Inspect or use a screen reader on the swap-direction and clear icon buttons; they do not have programmatic accessible names.
  6. In a flow with editable input and output amounts (for example a limit-order flow), inspect the accessible names of both amount fields; both are exposed as amount input.

Expected behavior

  • Every actionable token choice should be keyboard focusable and activatable using native control semantics.
  • Icon-only controls should expose concise accessible names describing their action.
  • Input and output amount fields should have distinct, meaningful accessible names.

Screenshots

Not required for the source-level keyboard/semantics issue. The relevant implementation is in the shared swap components under src/components/transactions/Swap/inputs/.

Desktop (please complete the following information):

  • OS: Browser/OS independent
  • Browser: Modern browsers
  • Version: Current

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context

The most direct remediation is small and does not require visual redesign: use a semantic button primitive for the popular token chips and add meaningful accessible names to the shared swap controls/inputs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/components/transactions/Swap/inputs/ and trace the shared token selector, swap-direction and clear controls, and amount inputs. Verify the popular token choices are keyboard focusable and activatable, icon-only controls have meaningful accessible names, and input/output fields have distinct names. Done when these behaviors work across the shared swap variants without visual redesign.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.