fix(a11y): add ARIA attributes to interactive elements

- ImageBlock: wrap clickable image in <button> with aria-label, add
  role=dialog and aria-modal to lightbox overlay
- KeyboardShortcuts: add role=dialog and aria-modal to modal overlay
- CodeBlock: add aria-label to copy button
- LanguageSelector: add aria-label with current language
This commit is contained in:
Nicolas Varrot
2026-02-11 20:36:35 +00:00
parent c3824dd29f
commit 78f82fd551
4 changed files with 19 additions and 7 deletions

View File

@@ -16,6 +16,7 @@ export function LanguageSelector() {
onClick={cycle}
className="flex items-center gap-1.5 rounded-2xl border border-white/8 bg-zinc-800/30 px-2.5 py-1.5 text-xs text-zinc-400 hover:text-zinc-200 hover:bg-white/5 transition-colors"
title="Change language"
aria-label={`Language: ${localeLabels[current] || current}. Click to change.`}
>
<Globe size={14} />
<span className="font-medium">{localeLabels[current] || current.toUpperCase()}</span>