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

@@ -26,6 +26,7 @@ export function CodeBlock(props: HTMLAttributes<HTMLPreElement>) {
onClick={handleCopy}
className="absolute top-2 right-2 p-1.5 rounded-lg bg-zinc-700/60 hover:bg-zinc-600/80 border border-white/10 text-zinc-400 hover:text-zinc-200 opacity-0 group-hover/code:opacity-100 transition-opacity duration-150"
title="Copy code"
aria-label="Copy code to clipboard"
type="button"
>
{copied