You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a11y: add accessible name for icon button (#3327)
## Summary
This PR fixes accessibility violations detected by IBM Equal Access
Accessibility Checker by adding <title> elements to SVG icons, ensuring
they have accessible names for screen readers.
## Problem
The IBM A11Y Checker identified 7 accessibility violations where SVG
elements lacked accessible names. According to WCAG 2.1 guidelines, all
non-decorative SVG elements must have an accessible name so that
assistive technologies can properly identify and announce them to users.
Violations Found:
- Github icon SVG missing accessible name
- LinkedIn icon SVG missing accessible name
- Mail icon SVG missing accessible name
- Medium icon SVG missing accessible name
- Slack icon SVG missing accessible name
- Twitter icon SVG missing accessible name
- Youtube icon SVG missing accessible name
<img width="2560" height="921" alt="image"
src="https://github.com/user-attachments/assets/ad478eec-f3a0-44f5-955c-805530170ab9"
/>
**Why is this important?**
An SVG component with a graphics role can contain essential information
as well as multiple shapes. When viewed together, these elements give
the impression of a single image. Providing a text alternative
(accessible name and description) makes the equivalent information
available through assistive technologies. With the explicit use of roles
and attributes, the author provides a clear indication that the content
should convey meaning via the accessibility name and description to
assistive technology users.
## Solution
Added `<title>` elements inside each SVG icon component to provide
accessible names. The title element is the standard method for providing
accessible names for SVG content.
## Additional Info
The patch submitted in this PR was generated by
[A11YRepair](https://sites.google.com/view/a11yrepair/home), an
automated Web Accessibility repair tool that I developed to address
common accessibility violations in web applications. The generated fixes
were manually reviewed before submission.
0 commit comments