mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-23 19:41:25 +01:00
Restore the accessibility role on call views (#29225)
This was mistakenly removed in a370a5cfa43. You can tell it was unintentional because the 'role' variable was just left unused.
This commit is contained in:
parent
bc7fe25974
commit
ef69c0ddc7
@ -58,7 +58,7 @@ const JoinCallView: FC<JoinCallViewProps> = ({ room, resizing, call, skipLobby,
|
||||
await Promise.all(calls.map(async (call) => await call.disconnect()));
|
||||
}, []);
|
||||
return (
|
||||
<div className="mx_CallView">
|
||||
<div className="mx_CallView" role={role}>
|
||||
<AppTile
|
||||
app={call.widget}
|
||||
room={room}
|
||||
|
||||
@ -69,8 +69,8 @@ describe("CallView", () => {
|
||||
client.reEmitter.stopReEmitting(room, [RoomStateEvent.Events]);
|
||||
});
|
||||
|
||||
const renderView = async (skipLobby = false): Promise<void> => {
|
||||
render(<CallView room={room} resizing={false} waitForCall={false} skipLobby={skipLobby} />);
|
||||
const renderView = async (skipLobby = false, role: string | undefined = undefined): Promise<void> => {
|
||||
render(<CallView room={room} resizing={false} waitForCall={false} skipLobby={skipLobby} role={role} />);
|
||||
await act(() => Promise.resolve()); // Let effects settle
|
||||
};
|
||||
|
||||
@ -96,6 +96,11 @@ describe("CallView", () => {
|
||||
WidgetMessagingStore.instance.stopMessaging(widget, room.roomId);
|
||||
});
|
||||
|
||||
it("accepts an accessibility role", async () => {
|
||||
await renderView(undefined, "main");
|
||||
screen.getByRole("main");
|
||||
});
|
||||
|
||||
it("calls clean on mount", async () => {
|
||||
const cleanSpy = jest.spyOn(call, "clean");
|
||||
await renderView();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user