Skip to content

fix(a11y): add aria-label to icon-only buttons across plugins#449

Merged
xiaolai merged 1 commit intomainfrom
fix/443-aria-label-accessibility
Mar 17, 2026
Merged

fix(a11y): add aria-label to icon-only buttons across plugins#449
xiaolai merged 1 commit intomainfrom
fix/443-aria-label-accessibility

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Mar 17, 2026

Summary

  • Add aria-label to 15+ icon-only buttons across React components and imperative DOM plugins
  • Replace hardcoded English strings in plugin buttons with i18n.t() calls (i18n compliance)
  • Add 15 new plugin.* translation keys to editor.json for all 10 locales

Files changed

React components (aria-label added):

  • HistoryView.tsx — revert/delete snapshot buttons
  • StatusBarRight.tsx — source/rich-text mode toggle

Plugin buttons (aria-label + i18n):

  • diagramExport.ts — Export PNG
  • mermaidPreviewDOM.ts — Zoom out/in
  • previewHelpers.ts — Copy/Cancel/Save
  • renderMarkmapPreview.ts — Fit to view
  • sourcePeekHeader.ts — Live preview/Cancel/Save
  • ImagePasteToastView.ts — Insert/Dismiss
  • mermaidPanZoom.ts — Reset zoom
  • aiSuggestion/tiptap.ts — Accept/Reject (already had aria-label, now i18n'd)

Locale files (15 new keys each):

  • src/locales/{en,de,es,fr,it,ja,ko,pt-BR,zh-CN,zh-TW}/editor.json

Test plan

  • pnpm check:all passes (lint, i18n, tests, build)
  • Tab through editor buttons with screen reader — all announce their purpose
  • Verify plugin buttons show translated labels in non-English locales

Closes #443

🤖 Generated with Claude Code

Screen readers could not determine the purpose of 15+ icon-only buttons
across plugins and components. Plugin buttons also had hardcoded English
strings violating the i18n rule.

Closes #443

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude claude bot enabled auto-merge (squash) March 17, 2026 09:48
@xiaolai xiaolai merged commit 7acc0bf into main Mar 17, 2026
3 checks passed
@xiaolai xiaolai deleted the fix/443-aria-label-accessibility branch March 20, 2026 22:13
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.

[audit] accessibility: icon-only buttons missing aria-label across plugins and components

1 participant