fix(a11y): add aria-live and aria-busy to code execution output in CodeBlock

When code is executing, the output area transitions from empty to
showing 'Running...' and then to STDOUT/STDERR results. Screen readers
had no way to know about these updates. Added aria-live="polite" so
changes are announced, and aria-busy={executing} to signal that content
is still loading.

Addresses WCAG 2.1 SC 4.1.3 (Status Messages).
This commit is contained in:
akinshaywai 2026-04-28 21:38:05 +01:00
parent 8dae237a0b
commit d97cff3d5a

View file

@ -589,6 +589,8 @@
{#if executing || stdout || stderr || result || files}
<div
class="bg-gray-50 dark:bg-black dark:text-white rounded-b-2xl! pt-2 pb-3 px-3.5 flex flex-col gap-2"
aria-live="polite"
aria-busy={executing}
>
{#if executing}
<div class=" ">