diff --git a/src/components/launch/HudControls.tsx b/src/components/launch/HudControls.tsx index 360499c79..a78925ffb 100644 --- a/src/components/launch/HudControls.tsx +++ b/src/components/launch/HudControls.tsx @@ -160,6 +160,7 @@ export const HudSystemAudioButton = memo(function HudSystemAudioButton({ )} - - @@ -493,10 +516,22 @@ export const HudWindowControls = memo(function HudWindowControls({ }) { return (
- -
diff --git a/src/components/launch/LaunchWindow.test.tsx b/src/components/launch/LaunchWindow.test.tsx index 73cc4ea5a..201cbfd8d 100644 --- a/src/components/launch/LaunchWindow.test.tsx +++ b/src/components/launch/LaunchWindow.test.tsx @@ -296,6 +296,7 @@ function resetLaunchMocks() { recorderState.value.softwareEncoderFallbackNoticeVisible = false; recorderState.value.dismissSoftwareEncoderFallbackNotice.mockClear(); recorderState.value.recording = false; + recorderState.value.canPauseRecording = false; recorderState.value.microphoneEnabled = false; recorderState.value.setMicrophoneEnabled.mockClear(); recorderState.value.setMicrophoneDeviceId.mockClear(); @@ -377,6 +378,53 @@ describe("LaunchWindow record button", () => { expect(recorderState.value.toggleRecording).not.toHaveBeenCalled(); }); + it("names the idle HUD icon controls for assistive technology", async () => { + renderLaunchWindow(); + await screen.findByTestId("launch-record-button"); + + expect(screen.getByTestId("launch-system-audio-button")).toHaveAttribute( + "aria-label", + "Enable system audio", + ); + expect(screen.getByTestId("launch-microphone-button")).toHaveAttribute( + "aria-label", + "Enable microphone", + ); + expect(screen.getByTestId("launch-webcam-button")).toHaveAttribute( + "aria-label", + "Enable webcam", + ); + expect(screen.getByTestId("launch-cursor-mode-button")).toHaveAttribute( + "aria-label", + "Use system cursor", + ); + expect(screen.getByTestId("launch-open-studio-button")).toHaveAttribute( + "aria-label", + "Open Studio", + ); + expect(screen.getByTitle("Hide HUD")).toHaveAttribute("aria-label", "Hide HUD"); + expect(screen.getByTitle("Close App")).toHaveAttribute("aria-label", "Close App"); + }); + + it("names the recording-state HUD controls for assistive technology", async () => { + recorderState.value.recording = true; + recorderState.value.canPauseRecording = true; + renderLaunchWindow(); + + expect(await screen.findByTestId("launch-pause-button")).toHaveAttribute( + "aria-label", + "tooltips.pauseRecording", + ); + expect(screen.getByTestId("launch-restart-button")).toHaveAttribute( + "aria-label", + "tooltips.restartRecording", + ); + expect(screen.getByTestId("launch-cancel-button")).toHaveAttribute( + "aria-label", + "tooltips.cancelRecording", + ); + }); + it("clears record-after-selection intent when the source picker closes without a selection", async () => { renderLaunchWindow(); await waitForSourceSelectionSubscription();