fix(a11y): add aria-label to LanguageIcon fallback dot and memoize component — #184#213
Merged
Jagadeeshftw merged 2 commits intoJun 23, 2026
Conversation
The fallback colored dot had no accessible name, making unknown languages
invisible to screen readers and colorblind users. Adds role=img and
aria-label={language} to the fallback div. Wraps the component with
React.memo to skip re-renders when props are unchanged, and uses useMemo
for the language-to-icon lookup.
Closes Grainlify#184
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
adding the aria-label to the LanguageIcon fallback dot and memoizing the component is a clean a11y plus perf win. rebased on latest main and merged. thanks! |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
role="img"andaria-label={language}to the fallback<div>.React.memoto skip re-renders when props are unchanged.useMemofor the language-to-icon map lookup.Test plan
COBOL) now announced as "COBOL" by screen readers<title>{language}</title>inside the SVG — unchangedCloses #184
🤖 Generated with Claude Code