Skip to content

Commit 1d8d079

Browse files
committed
make "go to lobby" accessible via keyboard (fix sonar cloud)
Signed-off-by: Timo K <[email protected]>
1 parent be38f54 commit 1d8d079

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/toasts/IncomingCallToast.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function JoinCallButtonWithCall({ onClick, call, disabledTooltip }: JoinCallButt
8282
interface DeclineCallButtonWithNotificationEventProps {
8383
onDeclined: (e: ButtonEvent) => void;
8484
notificationEvent: MatrixEvent;
85-
room: Room | null;
85+
room?: Room;
8686
}
8787

8888
function DeclineCallButtonWithNotificationEvent({
@@ -249,6 +249,12 @@ export function IncomingCallToast({ notificationEvent }: Props): JSX.Element {
249249
onClick={(e) => {
250250
onJoinClick(e);
251251
}}
252+
onKeyDown={(e) => {
253+
if (e.key === "Enter") {
254+
onJoinClick(e);
255+
}
256+
}}
257+
tabIndex={0}
252258
role="button"
253259
>
254260
<div className="mx_IncomingCallToast_message">

0 commit comments

Comments
 (0)