diff --git a/package.json b/package.json index 37d48159e3..5a240b7bb0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@sentry/browser": "^7.0.0", "@testing-library/react-hooks": "^8.0.1", "@vector-im/compound-design-tokens": "^1.2.0", - "@vector-im/compound-web": "^4.0.2", + "@vector-im/compound-web": "^4.1.0", "@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/language-common": "^3.0.4", "@zxcvbn-ts/language-en": "^3.0.2", diff --git a/playwright/snapshots/timeline/timeline.spec.ts/event-tile-reply-chains-irc-layout-linux.png b/playwright/snapshots/timeline/timeline.spec.ts/event-tile-reply-chains-irc-layout-linux.png index 45c43f06fe..98ec9e0cf6 100644 Binary files a/playwright/snapshots/timeline/timeline.spec.ts/event-tile-reply-chains-irc-layout-linux.png and b/playwright/snapshots/timeline/timeline.spec.ts/event-tile-reply-chains-irc-layout-linux.png differ diff --git a/src/accessibility/roving/RovingAccessibleTooltipButton.tsx b/src/accessibility/roving/RovingAccessibleTooltipButton.tsx index 5607089c6e..6594f2782e 100644 --- a/src/accessibility/roving/RovingAccessibleTooltipButton.tsx +++ b/src/accessibility/roving/RovingAccessibleTooltipButton.tsx @@ -16,18 +16,15 @@ limitations under the License. import React, { ComponentProps } from "react"; -import AccessibleTooltipButton from "../../components/views/elements/AccessibleTooltipButton"; import { useRovingTabIndex } from "../RovingTabIndex"; import { Ref } from "./types"; +import AccessibleButton from "../../components/views/elements/AccessibleButton"; -type Props = Omit< - ComponentProps>, - "tabIndex" -> & { +type Props = Omit>, "tabIndex"> & { inputRef?: Ref; }; -// Wrapper to allow use of useRovingTabIndex for simple AccessibleTooltipButtons outside of React Functional Components. +// Wrapper to allow use of useRovingTabIndex for simple AccessibleButtons outside of React Functional Components. export const RovingAccessibleTooltipButton = ({ inputRef, onFocus, @@ -35,7 +32,7 @@ export const RovingAccessibleTooltipButton = ): JSX.Element => { const [onFocusInternal, isActive, ref] = useRovingTabIndex(inputRef); return ( - { onFocusInternal(); diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index 9cf3592208..87b5cb79c4 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -229,22 +229,16 @@ const ReplyInThreadButton: React.FC = ({ mxEvent }) => { } }; + const title = !hasARelation ? _t("action|reply_in_thread") : _t("threads|error_start_thread_existing_relation"); + return ( -
- {!hasARelation - ? _t("action|reply_in_thread") - : _t("threads|error_start_thread_existing_relation")} -
- - } - title={!hasARelation ? _t("action|reply_in_thread") : _t("threads|error_start_thread_existing_relation")} + title={title} onClick={onClick} onContextMenu={onClick} + placement="left" >
@@ -509,18 +503,7 @@ export default class MessageActionBar extends React.PureComponent -
- {this.props.isQuoteExpanded - ? _t("timeline|mab|collapse_reply_chain") - : _t("timeline|mab|expand_reply_chain")} -
-
- {_t(ALTERNATE_KEY_NAME[Key.SHIFT]) + " + " + _t("action|click")} -
- - ); + toolbarOpts.push( {this.props.isQuoteExpanded ? : } , diff --git a/src/components/views/pips/WidgetPip.tsx b/src/components/views/pips/WidgetPip.tsx index 4a0d5e6618..2ba9e39e25 100644 --- a/src/components/views/pips/WidgetPip.tsx +++ b/src/components/views/pips/WidgetPip.tsx @@ -34,7 +34,6 @@ import { WidgetType } from "../../../widgets/WidgetType"; import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingStore"; import WidgetUtils from "../../../utils/WidgetUtils"; import { ElementWidgetActions } from "../../../stores/widgets/ElementWidgetActions"; -import { Alignment } from "../elements/Tooltip"; interface Props { widgetId: string; @@ -128,9 +127,9 @@ export const WidgetPip: FC = ({ widgetId, room, viewingRoom, onStartMovin diff --git a/src/components/views/rooms/MessageComposerFormatBar.tsx b/src/components/views/rooms/MessageComposerFormatBar.tsx index 0d737c4001..5893540528 100644 --- a/src/components/views/rooms/MessageComposerFormatBar.tsx +++ b/src/components/views/rooms/MessageComposerFormatBar.tsx @@ -127,16 +127,6 @@ interface IFormatButtonProps { class FormatButton extends React.PureComponent { public render(): React.ReactNode { const className = `mx_MessageComposerFormatBar_button mx_MessageComposerFormatBar_buttonIcon${this.props.icon}`; - let shortcut; - if (this.props.shortcut) { - shortcut =
{this.props.shortcut}
; - } - const tooltip = ( -
-
{this.props.label}
-
{shortcut}
-
- ); // element="button" and type="button" are necessary for the buttons to work on WebKit, // otherwise the text is deselected before onClick can ever be called @@ -145,8 +135,9 @@ class FormatButton extends React.PureComponent { element="button" type="button" onClick={this.props.onClick} + aria-label={this.props.label} title={this.props.label} - tooltip={tooltip} + caption={this.props.shortcut} className={className} /> ); diff --git a/test/components/structures/__snapshots__/RoomView-test.tsx.snap b/test/components/structures/__snapshots__/RoomView-test.tsx.snap index 80d6ac7c74..b6c87aaaef 100644 --- a/test/components/structures/__snapshots__/RoomView-test.tsx.snap +++ b/test/components/structures/__snapshots__/RoomView-test.tsx.snap @@ -397,6 +397,7 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =