diff --git a/src/components/views/rooms/RecentlyViewedButton.tsx b/src/components/views/rooms/RecentlyViewedButton.tsx index 84d6c91abd..58b055c4a3 100644 --- a/src/components/views/rooms/RecentlyViewedButton.tsx +++ b/src/components/views/rooms/RecentlyViewedButton.tsx @@ -21,11 +21,11 @@ import { UPDATE_EVENT } from "../../../stores/AsyncStore"; import { MenuItem } from "../../structures/ContextMenu"; import { useEventEmitterState } from "../../../hooks/useEventEmitter"; import { _t } from "../../../languageHandler"; -import RoomAvatar from "../avatars/RoomAvatar"; import dis from "../../../dispatcher/dispatcher"; import InteractiveTooltip, { Direction } from "../elements/InteractiveTooltip"; import { roomContextDetailsText } from "../../../Rooms"; import { Action } from "../../../dispatcher/actions"; +import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar"; const RecentlyViewedButton = () => { const tooltipRef = useRef(); @@ -47,7 +47,7 @@ const RecentlyViewedButton = () => { tooltipRef.current?.hideTooltip(); }} > - +
{ crumb.name }
{ contextDetails &&
diff --git a/src/components/views/rooms/RoomBreadcrumbs.tsx b/src/components/views/rooms/RoomBreadcrumbs.tsx index f3d69b1f28..f4b8e18209 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.tsx +++ b/src/components/views/rooms/RoomBreadcrumbs.tsx @@ -24,10 +24,11 @@ import { _t } from "../../../languageHandler"; import defaultDispatcher from "../../../dispatcher/dispatcher"; import Analytics from "../../../Analytics"; import { UPDATE_EVENT } from "../../../stores/AsyncStore"; -import { RovingAccessibleTooltipButton } from "../../../accessibility/RovingTabIndex"; +import { useRovingTabIndex } from "../../../accessibility/RovingTabIndex"; import Toolbar from "../../../accessibility/Toolbar"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { Action } from "../../../dispatcher/actions"; +import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; interface IProps { } @@ -43,6 +44,31 @@ interface IState { skipFirst: boolean; } +const RoomBreadcrumbTile = ({ room, onClick }: { room: Room, onClick: () => void }) => { + const [onFocus, isActive, ref] = useRovingTabIndex(); + + return ( + + + + ); +}; + @replaceableComponent("views.rooms.RoomBreadcrumbs") export default class RoomBreadcrumbs extends React.PureComponent { private isMounted = true; @@ -87,23 +113,7 @@ export default class RoomBreadcrumbs extends React.PureComponent public render(): React.ReactElement { const tiles = BreadcrumbsStore.instance.rooms.map((r, i) => { - return ( - this.viewRoom(r, i)} - aria-label={_t("Room %(name)s", { name: r.name })} - title={r.name} - tooltipClassName="mx_RoomBreadcrumbs_Tooltip" - > - - - ); + return this.viewRoom(r, i)} />; }); if (tiles.length > 0) {