Skip to content

fix: add aria-label to icon-only and emoji-only buttons (ux-fix-3) - #61

Merged
mitch-b merged 1 commit into
mainfrom
ux/ux-fix-3
Apr 5, 2026
Merged

fix: add aria-label to icon-only and emoji-only buttons (ux-fix-3)#61
mitch-b merged 1 commit into
mainfrom
ux/ux-fix-3

Conversation

@mitch-b

@mitch-b mitch-b commented Apr 4, 2026

Copy link
Copy Markdown
Owner

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:

File Issue
Dialog.razor × close button had no aria-label
ItemComments.razor Trash icon delete button had no aria-label
NotificationFlyout.razor 🗑️ delete button and ✕ close button had no aria-label
WishlistDetails.razor Grid/List view-toggle buttons used title (mouse-hover only, not announced by screen readers)

Changes

  • Dialog.razor: Added aria-label="Close" to the × button
  • ItemComments.razor: Added aria-label="Delete comment" to the trash icon button
  • NotificationFlyout.razor: Added aria-label="Delete notification" to the 🗑️ button; added aria-label="Close notifications" to the ✕ button
  • WishlistDetails.razor: Replaced title attributes with aria-label on Grid View and List View toggle buttons

Testing

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.

- 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>
@mitch-b
mitch-b merged commit 4900811 into main Apr 5, 2026
1 check passed
@mitch-b
mitch-b deleted the ux/ux-fix-3 branch April 5, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant