diff --git a/src/room/LayoutSwitch.tsx b/src/room/LayoutSwitch.tsx index 80995a35c..91ba0654f 100644 --- a/src/room/LayoutSwitch.tsx +++ b/src/room/LayoutSwitch.tsx @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { type FC } from "react"; +import { useId, type FC } from "react"; import { SpotlightViewIcon, GridIcon, @@ -24,10 +24,11 @@ interface Props { export const LayoutSwitch: FC = ({ vm, className }) => { const { t } = useTranslation(); const layout = useBehavior(vm.layout$); + const name = useId(); return ( - name="layout" + name={name} aria-label={t("layout_switch_label")} leftLabel={t("layout_spotlight_label")} leftValue="spotlight" diff --git a/src/room/__snapshots__/InCallView.test.tsx.snap b/src/room/__snapshots__/InCallView.test.tsx.snap index 8a805668d..984e2b12e 100644 --- a/src/room/__snapshots__/InCallView.test.tsx.snap +++ b/src/room/__snapshots__/InCallView.test.tsx.snap @@ -432,8 +432,8 @@ exports[`InCallView > rendering > renders 1`] = ` data-size="lg" > @@ -452,9 +452,9 @@ exports[`InCallView > rendering > renders 1`] = ` />