Tooltip: improve accessibility for call and voice messages (#12489)
* Move to `AccessibilityButton` * Update snapshots * Add tests * Update snapshots
This commit is contained in:
@@ -36,13 +36,12 @@ import {
|
||||
LiveContentType,
|
||||
} from "../components/views/rooms/LiveContentSummary";
|
||||
import { useCall, useJoinCallButtonDisabledTooltip } from "../hooks/useCall";
|
||||
import { ButtonEvent } from "../components/views/elements/AccessibleButton";
|
||||
import AccessibleButton, { ButtonEvent } from "../components/views/elements/AccessibleButton";
|
||||
import { useDispatcher } from "../hooks/useDispatcher";
|
||||
import { ActionPayload } from "../dispatcher/payloads";
|
||||
import { Call } from "../models/Call";
|
||||
import { AudioID } from "../LegacyCallHandler";
|
||||
import { useEventEmitter, useTypedEventEmitter } from "../hooks/useEventEmitter";
|
||||
import AccessibleTooltipButton from "../components/views/elements/AccessibleTooltipButton";
|
||||
import { CallStore, CallStoreEvent } from "../stores/CallStore";
|
||||
|
||||
export const getIncomingCallToastKey = (callId: string, roomId: string): string => `call_${callId}_${roomId}`;
|
||||
@@ -195,7 +194,7 @@ export function IncomingCallToast({ notifyEvent }: Props): JSX.Element {
|
||||
disabledTooltip={otherCallIsOngoing ? "Ongoing call" : undefined}
|
||||
/>
|
||||
</div>
|
||||
<AccessibleTooltipButton
|
||||
<AccessibleButton
|
||||
className="mx_IncomingCallToast_closeButton"
|
||||
onClick={onCloseClick}
|
||||
title={_t("action|close")}
|
||||
|
||||
@@ -25,7 +25,6 @@ import LegacyCallHandler, { LegacyCallHandlerEvent } from "../LegacyCallHandler"
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
import { _t } from "../languageHandler";
|
||||
import RoomAvatar from "../components/views/avatars/RoomAvatar";
|
||||
import AccessibleTooltipButton from "../components/views/elements/AccessibleTooltipButton";
|
||||
import AccessibleButton, { ButtonEvent } from "../components/views/elements/AccessibleButton";
|
||||
|
||||
export const getIncomingLegacyCallToastKey = (callId: string): string => `call_${callId}`;
|
||||
@@ -136,7 +135,7 @@ export default class IncomingLegacyCallToast extends React.Component<IProps, ISt
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</div>
|
||||
<AccessibleTooltipButton
|
||||
<AccessibleButton
|
||||
className={silenceClass}
|
||||
disabled={callForcedSilent}
|
||||
onClick={this.onSilenceClick}
|
||||
|
||||
Reference in New Issue
Block a user