Skip to content

Enhance accessibility by adding aria-hidden attributes to icons acros…#280

Merged
yamcodes merged 3 commits intomainfrom
262-fix-svg-img-alt-accessibility-violation---lucide-react-and-icons-pack-svgs
Nov 4, 2025
Merged

Enhance accessibility by adding aria-hidden attributes to icons acros…#280
yamcodes merged 3 commits intomainfrom
262-fix-svg-img-alt-accessibility-violation---lucide-react-and-icons-pack-svgs

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Nov 4, 2025

…s multiple components for improved screen reader support.

Closes #262

Summary by CodeRabbit

  • Accessibility Improvements

    • Added accessibility attributes to decorative icons and visual elements across components, improving compatibility with screen readers and assistive technologies
  • Tests

    • Updated accessibility test configuration to enhance compliance checking and violation detection

…s multiple components for improved screen reader support.
@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

⚠️ No Changeset found

Latest commit: a8d820e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Nov 4, 2025 8:54pm

@github-actions github-actions bot added docs Improvements or additions to documentation www Improvements or additions to arkenv.js.org tests This issue or PR is about adding, removing or changing tests labels Nov 4, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Warning

Rate limit exceeded

@yamcodes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ecfd029 and a8d820e.

📒 Files selected for processing (1)
  • apps/www/components/page/copy-button.integration.test.tsx (2 hunks)

Walkthrough

This PR systematically fixes svg-img-alt accessibility violations by adding aria-hidden="true" to decorative SVG icons across UI components and documentation files. The accessibility test configuration is updated to re-enable the svg-img-alt rule validation, enforcing compliance going forward.

Changes

Cohort / File(s) Change Summary
Component icon accessibility updates
apps/www/components/page/copy-button.tsx, apps/www/components/page/edit-on-github.tsx, apps/www/components/page/sail-button.tsx, apps/www/components/page/star-us-button.tsx, apps/www/components/ui/toast.tsx
Added aria-hidden="true" to decorative SVG icons. These icons are contained within accessible elements (buttons/links with labels) and do not convey additional information to users.
Documentation MDX icon updates
apps/www/content/docs/examples.mdx, apps/www/content/docs/index.mdx
Added aria-hidden="true" to decorative GitHub and Globe icons within Card components, ensuring screen readers skip these purely visual elements.
Documentation cleanup
apps/www/content/docs/quickstart.mdx
Removed unused imports (FolderCode and Blocks from lucide-react).
Accessibility test configuration
tooling/playwright-www/tests/a11y.test.ts
Removed svg-img-alt from disabled accessibility rules, enabling validation of decorative SVG accessibility attributes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Homogeneous changes across multiple files following a consistent pattern (adding aria-hidden="true" to decorative icons)
  • Straightforward reasoning applies uniformly across all icon-related edits
  • Test configuration change is minimal and isolated
  • No complex logic or control flow modifications

Possibly related PRs

  • Accessibility tests #259: Modifies the same a11y.test.ts test configuration file, likely part of the same accessibility fix initiative.
  • Star us button #133: Introduces StarUsButton component that is updated in this PR with accessibility attributes.
  • Add integration tests #277: Modifies CopyButton component icon rendering, which is also updated here for accessibility.

Suggested reviewers

  • yamcodes

Poem

🐰 With icons hidden from prying ears,
We banish those svg tears,
Aria-hidden marks what's mere decoration,
Accessibility reigns—pure jubilation! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding aria-hidden attributes to icons for accessibility enhancement.
Linked Issues check ✅ Passed The PR successfully implements solution #1 from issue #262 by adding aria-hidden="true" to decorative SVG icons across components and tests.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the svg-img-alt accessibility violation; the removal of unused imports in quickstart.mdx is a minor related cleanup.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

… by verifying SVG class presence instead of relying on aria-labels. This enhances clarity for screen readers and aligns with recent accessibility enhancements.
@yamcodes yamcodes merged commit ec6a662 into main Nov 4, 2025
15 checks passed
@yamcodes yamcodes deleted the 262-fix-svg-img-alt-accessibility-violation---lucide-react-and-icons-pack-svgs branch November 4, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation tests This issue or PR is about adding, removing or changing tests www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix svg-img-alt accessibility violation - lucide-react and icons-pack SVGs

1 participant