Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make Swap to / from toggle keyboard accessible #7461

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

darkwing
Copy link
Contributor

Description

At present the down/up-arrow button to switch the "You pay" and "You receive" value is not keyboard accessible. Simply switching to using a button element, with some helpful CSS, makes this element more accessible.

Screen capture

Screen.Recording.2023-10-12.at.9.49.31.PM.mov

QA (ie manual testing)

  1. Open the Swaps page
  2. Tab until you get to the Down/Up toggle
  3. Press enter a bunch
  4. See the values change

Devices

Automated testing

  • Unit test
  • Integration/E2E test

@darkwing darkwing requested review from a team and zzmp October 13, 2023 02:50
@vercel
Copy link

vercel bot commented Oct 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 13, 2023 2:53am

@@ -69,10 +69,13 @@ import { useIsDarkMode } from '../../theme/components/ThemeToggle'
import { OutputTaxTooltipBody } from './TaxTooltipBody'
import { UniswapXOptIn } from './UniswapXOptIn'

export const ArrowContainer = styled.div`
export const ArrowContainer = styled.button`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than change this to a button, which requires additional styles, would it be feasible to render the actual component using as="button" (docs)?

@zzmp zzmp added the reference Reference PR label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reference Reference PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants