fix: focusable element when webcam expanded with no devices, add error test

- LaunchWindow: render sr-only <select> when webcamExpanded but
  cameraDevices.length === 0 (loading/error/empty), so keyboard users
  always have a focusable element even in no-camera states
- useCameraDevices.test: add error-branch test asserting error message,
  empty devices array and isLoading=false when enumerateDevices rejects
This commit is contained in:
Etienne Lescot
2026-03-27 16:28:53 +01:00
parent 9817c85acf
commit baec9a7585
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ export function LaunchWindow() {
/>
</>
))}
{!webcamExpanded && (
{(!webcamExpanded || cameraDevices.length === 0) && (
<select
value={webcamDeviceId || selectedCameraId}
onChange={(e) => {