A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
chore(app): add user area control ids, widen focus guard type
Hampusc8f34d342659
diff --git a/fluxer_app/src/features/app/components/layout/UserArea.tsx b/fluxer_app/src/features/app/components/layout/UserArea.tsxindex a55790fa3..9a4ec526d 100644--- a/fluxer_app/src/features/app/components/layout/UserArea.tsx+++ b/fluxer_app/src/features/app/components/layout/UserArea.tsx@@ -349,7 +349,7 @@ const UserAreaInner = observer(onClick={isMuteToggleLocked ? undefined : () => VoiceStateCommands.toggleSelfMute(null)}onContextMenu={handleMicContextMenu}disabled={isMuteToggleLocked}- data-flx="app.user-area.user-area-inner.control-button.undefined"+ data-flx="app.user-area.user-area-inner.control-button.mute">{effectiveMuted ? (<MicrophoneSlashIcon@@ -399,7 +399,7 @@ const UserAreaInner = observer(onClick={isGuildDeafened ? undefined : () => VoiceStateCommands.toggleSelfDeaf(null)}onContextMenu={handleSpeakerContextMenu}disabled={isGuildDeafened}- data-flx="app.user-area.user-area-inner.control-button.undefined--2"+ data-flx="app.user-area.user-area-inner.control-button.deafen">{isDeafened || isGuildDeafened ? (<SpeakerSlashIcondiff --git a/fluxer_app/src/features/app/hooks/useTabKeyFocusGuard.ts b/fluxer_app/src/features/app/hooks/useTabKeyFocusGuard.tsindex 906290b67..6ac201219 100644--- a/fluxer_app/src/features/app/hooks/useTabKeyFocusGuard.ts+++ b/fluxer_app/src/features/app/hooks/useTabKeyFocusGuard.ts@@ -4,7 +4,7 @@ import {type FocusEvent, useCallback, useEffect, useRef} from 'react';const TAB_KEY_RECENCY_THRESHOLD_MS = 100;-export function useTabKeyFocusGuard(): (event: FocusEvent<HTMLAnchorElement>) => void {+export function useTabKeyFocusGuard(): (event: FocusEvent<HTMLElement>) => void {const lastTabKeyAtRef = useRef(0);useEffect(() => {const onKeyDown = (event: KeyboardEvent) => {@@ -13,7 +13,7 @@ export function useTabKeyFocusGuard(): (event: FocusEvent<HTMLAnchorElement>) =>document.addEventListener('keydown', onKeyDown, true);return () => document.removeEventListener('keydown', onKeyDown, true);}, []);- return useCallback((event: FocusEvent<HTMLAnchorElement>) => {+ return useCallback((event: FocusEvent<HTMLElement>) => {if (performance.now() - lastTabKeyAtRef.current > TAB_KEY_RECENCY_THRESHOLD_MS) {event.currentTarget.blur();}