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(skip-link): add focus ring #330

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Conversation

billhimmelsbach
Copy link
Contributor

A very small change to add the focus ring in for skip links like it appears on consumerfinance.gov. There are other styles we could add from there potentially in the future, but the focus ring is the one that matter for accessibility, so I would like to prioritize this small change first.

Changes

  • adds in focus ring as per consumerfinance.gov 's example

How to test this PR

  1. Does this add a focus ring to the skip link?

Screenshots

Before
Screenshot 2024-04-02 at 3 36 59 AM

After
Screenshot 2024-04-02 at 3 35 55 AM

Example from consumerfinance.gov
Screenshot 2024-04-02 at 3 36 19 AM

Notes

  • we can enhance this component's styling more in the future with the fancier transition from consumerfinance.gov, etc. but for now let's get the necessary accessible parts in ASAP

Copy link

netlify bot commented Apr 2, 2024

Deploy Preview for cfpb-design-system-react ready!

Name Link
🔨 Latest commit 3b84faf
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system-react/deploys/660c4bc36f6cb500083c9aba
😎 Deploy Preview https://deploy-preview-330--cfpb-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@billhimmelsbach billhimmelsbach enabled auto-merge (squash) April 2, 2024 18:17
@billhimmelsbach billhimmelsbach merged commit 34236ba into main Apr 2, 2024
7 of 9 checks passed
@billhimmelsbach billhimmelsbach deleted the 359-focus-ring-for-skip-links branch April 2, 2024 18:20
billhimmelsbach added a commit to cfpb/sbl-frontend that referenced this pull request Apr 2, 2024
Currently we don't have skip links that aid in making our content
accessible to those using tab navigation.

Closes: #359 

## Changes

- adds skip link to App.tsx
- adds missing `id="main"` to pages that still need it

## How to test this PR

1. Can you press `tab` then `enter` to skip to the main content of a
page in the tab order? (Try pressing `tab` again to confirm.

## Screenshots
<img width="533" alt="Screenshot 2024-04-02 at 3 35 55 AM"
src="https://github.com/cfpb/sbl-frontend/assets/19983248/fb528a31-ad7e-4dc7-b941-dd9f8f786781">


## Notes

- the skip link could be a little fancier with its CSS transition like
on cf.gov, but we're prioritizing [just the accessibility
first](cfpb/design-system-react#330)
- works in conjunction with
cfpb/design-system-react#330 for the focus ring
billhimmelsbach added a commit to cfpb/sbl-frontend that referenced this pull request Apr 2, 2024
**Note: same as #360, but now
merging on main**

Currently we don't have skip links that aid in making our content
accessible to those using tab navigation.

Closes: #359 

## Changes

- adds skip link to App.tsx
- adds missing `id="main"` to pages that still need it

## How to test this PR

1. Can you press `tab` then `enter` to skip to the main content of a
page in the tab order? (Try pressing `tab` again to confirm.

## Screenshots
<img width="533" alt="Screenshot 2024-04-02 at 3 35 55 AM"
src="https://github.com/cfpb/sbl-frontend/assets/19983248/fb528a31-ad7e-4dc7-b941-dd9f8f786781">


## Notes

- the skip link could be a little fancier with its CSS transition like
on cf.gov, but we're prioritizing [just the accessibility
first](cfpb/design-system-react#330)
- works in conjunction with
cfpb/design-system-react#330 for the focus ring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants