Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(export): name the GIF loop toggle for screen readers
EtienneLescot65a155ab7684
diff --git a/src/components/ai-edition/ExportDialog.params.test.tsx b/src/components/ai-edition/ExportDialog.params.test.tsxindex d13326d69..5dd336856 100644--- a/src/components/ai-edition/ExportDialog.params.test.tsx+++ b/src/components/ai-edition/ExportDialog.params.test.tsx@@ -171,6 +171,17 @@ describe("ExportDialog format settings", () => {expect(social?.bitrate).toBe((web?.bitrate ?? 0) / 2);});+ it("gives the GIF loop toggle an accessible name", () => {+ // The switch renders no text of its own; without a name a screen reader only+ // announces "pressed" and never says which setting it is.+ renderDialog();+ fireEvent.click(screen.getByRole("button", { name: "GIF" }));+ expect(screen.getByRole("button", { name: "Loop GIF" })).toHaveAttribute(+ "aria-pressed",+ "true",+ );+ });+it("a GIF is 15 fps and README-sized at the small preset", async () => {renderDialog();fireEvent.click(screen.getByRole("button", { name: "GIF" }));diff --git a/src/components/ai-edition/ExportDialog.tsx b/src/components/ai-edition/ExportDialog.tsxindex 08ff97a86..ea0d0f3f4 100644--- a/src/components/ai-edition/ExportDialog.tsx+++ b/src/components/ai-edition/ExportDialog.tsx@@ -44,6 +44,7 @@ import type { CompositorClipInput } from "@/native/contracts";import { buildSceneDescription, resolveVisibleClips } from "@/native/sceneDescription";import { ModalShell } from "./Modals";import styles from "./NewEditorShell.module.css";+import { Toggle } from "./RightPanes";type Phase = "idle" | "configuring" | "rendering" | "writing" | "done" | "error";@@ -669,12 +670,11 @@ export function ExportDialog({ open, onClose, document }: ExportDialogProps) {</div><div className={styles.paneRow} style={{ margin: 0 }}><span className={styles.label}>{t("exportDialog.loopGif")}</span>- <button- type="button"- className={`${styles.toggle} ${gifLoop ? styles.isOn : ""}`}- aria-pressed={gifLoop}+ <Toggle+ checked={gifLoop}+ ariaLabel={t("exportDialog.loopGif")}disabled={isBusy}- onClick={() => setGifLoop((v) => !v)}+ onChange={setGifLoop}/></div><div