fix: add aria-label to icon-only and emoji-only buttons (ux-fix-3) - #61
Merged
Conversation
- Dialog.razor: add aria-label="Close" to the × close button - ItemComments.razor: add aria-label="Delete comment" to trash icon button - NotificationFlyout.razor: add aria-label="Delete notification" to 🗑️ button and aria-label="Close notifications" to ✕ button - WishlistDetails.razor: replace title attributes with aria-label on Grid/List view-toggle buttons Fixes WCAG 2.1 SC 1.1.1 (Level A) violations — screen readers now announce meaningful labels for all icon-only and emoji-only interactive controls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Fixes WCAG 2.1 SC 1.1.1 (Level A) — multiple interactive buttons contained only icons or emoji with no accessible text alternative, making them meaningless to screen reader users.
Problem
Screen readers announced these controls as simply "button" with no indication of their purpose:
Dialog.razoraria-labelItemComments.razoraria-labelNotificationFlyout.razoraria-labelWishlistDetails.razortitle(mouse-hover only, not announced by screen readers)Changes
Dialog.razor: Addedaria-label="Close"to the × buttonItemComments.razor: Addedaria-label="Delete comment"to the trash icon buttonNotificationFlyout.razor: Addedaria-label="Delete notification"to the 🗑️ button; addedaria-label="Close notifications"to the ✕ buttonWishlistDetails.razor: Replacedtitleattributes witharia-labelon Grid View and List View toggle buttonsTesting
No automated test suite exists for Razor component accessibility in this project. Changes are minimal and targeted — each is a single attribute addition/replacement on an existing element.