Fix Accessibility Issues in Showcase Thumbnail Links #2419
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.
Issue Description
When running IBM Accessibility Checker (Version 4.0.9) on the showcase page, multiple (49) violations were detected indicating that links in the showcase thumbnail component lack accessible names. This creates barriers for screen reader users who cannot understand the purpose of these links. The checker identified multiple instances of "Hyperlink has no link text, label or image with a text alternative" violations.
Screenshot of Webpage:
Violation Report:
Solution
Added aria-label attribute to the link element in the ShowcaseThumbnail component, using showcase.name as the accessible label text. This ensures:
Generated Patch of A11YRepair:
Added
aria-label={showcase.name}attribute to the absolutely positioned link element.Fix Before:
There are 49 violations - "Hyperlink has no link text, label or image with a text alternative"
Violation Element Example:
Fix After:
All 49 violations have been resolved, use the
aria-labelattribute to point to text visible on the page that identifies the link purpose.Fixed Violation Element Example: