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(a11y): add explicit labels to alert icons #373

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

billhimmelsbach
Copy link
Contributor

@billhimmelsbach billhimmelsbach commented Jun 28, 2024

Often information is conveyed by the icons of our alerts (this is an error or warning, is this an external link) that is not conveyed explicitly by the text. These icons are then not presentational, and should be labeled.

Changes

  • Explicitly adds aria-labels to svgs in alerts, field level alerts, and alert links
  • removes alt text in favor of aria-label since alt text is not universally supported on svg elements (changes to the Icon element's use of alt text will be in a follow-up PR)

How to test this PR

  1. Are the svgs now properly labeled on alerts, field level alerts, and alert links?

Screenshots

Screenshot 2024-06-28 at 4 46 36 AM

Copy link

netlify bot commented Jun 28, 2024

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

Name Link
🔨 Latest commit 6e8834e
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system-react/deploys/66fe98b29106750009a36b5b
😎 Deploy Preview https://deploy-preview-373--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.

Copy link
Contributor

@meissadia meissadia left a comment

Choose a reason for hiding this comment

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

LGTM!

@billhimmelsbach billhimmelsbach enabled auto-merge (squash) October 3, 2024 13:14
@billhimmelsbach billhimmelsbach merged commit 546477b into main Oct 3, 2024
7 checks passed
@billhimmelsbach billhimmelsbach deleted the 372-improve-alert-accessibility branch October 3, 2024 13:15
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