Skip to content

fix: add state-aware accessible names to icon-only controls - #18

Merged
DevOlabode merged 1 commit into
DevOlabode:mainfrom
dyk1454683243-sudo:cursor/accessible-icon-names-268d
Sep 18, 2026
Merged

DevOlabode merged 1 commit into
DevOlabode:mainfrom
dyk1454683243-sudo:cursor/accessible-icon-names-268d

Conversation

@dyk1454683243-sudo

Copy link
Copy Markdown
Contributor

What does this PR do?

Audits icon-only controls in the extension popup and makes #theme-toggle announce the theme it will switch to, instead of a static "Toggle theme" label.

  • #theme-toggle now uses "Switch to dark theme" / "Switch to light theme" for both aria-label and title, and updates after init and each toggle
  • Decorative icons (, , ×) are marked aria-hidden so the accessible name comes from the label
  • Per-row delete buttons keep their existing names; hover title now matches the specific item
  • Options page was audited: it has no icon-only controls (both buttons have visible text)

No behavior changes beyond labeling/state. Theme persistence and click handling are unchanged.

Keyboard: these controls are native <button> elements, are not tabindex="-1", and .icon-btn does not remove focus outlines.

Related Issue

Closes #11

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Tests

Screenshots

N/A — labeling/state only; no visual design change.

Checklist

  • I followed the contribution guidelines
  • I tested my changes
  • I updated documentation if necessary
  • This PR focuses on one change

Theme toggle now announces Switch to dark/light theme instead of a
static Toggle theme label. Decorative icons stay hidden from AT.

Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

@cursoragent is attempting to deploy a commit to the solabode499-5056's projects Team on Vercel.

A member of the Team first needs to authorize it.

@dyk1454683243-sudo
dyk1454683243-sudo marked this pull request as ready for review September 18, 2026 02:25

@DevOlabode DevOlabode left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving - this is the more complete fix for #11: covers the theme-toggle label/state plus the decorative icon aria-hidden cleanup and per-item delete button titles. Verified the interpolated title/name values are already escapeHtml'd upstream, so no XSS concern. Merging.

@DevOlabode
DevOlabode merged commit e4343d7 into DevOlabode:main Sep 18, 2026
1 of 2 checks passed
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.

Add accessible names to icon-only controls

3 participants