diff --git a/res/css/views/rooms/_RoomHeader.pcss b/res/css/views/rooms/_RoomHeader.pcss index 6a25ea7943..2af5e5ca10 100644 --- a/res/css/views/rooms/_RoomHeader.pcss +++ b/res/css/views/rooms/_RoomHeader.pcss @@ -74,14 +74,17 @@ limitations under the License. } } -.mx_RoomHeader:hover .mx_RoomHeader_topic { - /* height needed to compute the transition, it equals to the `line-height` +.mx_RoomHeader:hover, +.mx_RoomHeader:focus-within { + .mx_RoomHeader_topic { + /* height needed to compute the transition, it equals to the `line-height` value in pixels */ - height: calc($font-13px * 1.5); - opacity: 1; + height: calc($font-13px * 1.5); + opacity: 1; - a:hover { - text-decoration: underline; + a:hover { + text-decoration: underline; + } } } diff --git a/src/components/views/elements/FacePile.tsx b/src/components/views/elements/FacePile.tsx index 67c11e2f35..d459040f0b 100644 --- a/src/components/views/elements/FacePile.tsx +++ b/src/components/views/elements/FacePile.tsx @@ -21,7 +21,7 @@ import { AvatarStack, Tooltip } from "@vector-im/compound-web"; import MemberAvatar from "../avatars/MemberAvatar"; import AccessibleButton, { ButtonEvent } from "./AccessibleButton"; -interface IProps extends HTMLAttributes { +interface IProps extends Omit, "onChange"> { members: RoomMember[]; size: string; overflow: boolean; @@ -32,6 +32,11 @@ interface IProps extends HTMLAttributes { onClick?: (e: ButtonEvent) => void | Promise; } +/** + * A component which displays a list of avatars in a row, with a tooltip showing the names of the users. + * + * Any additional props, not named explicitly here, are passed to the underlying {@link AccessibleButton}. + */ const FacePile: FC = ({ members, size, @@ -40,6 +45,7 @@ const FacePile: FC = ({ tooltipShortcut, children, viewUserOnClick = true, + onClick, ...props }) => { const faces = members.map( @@ -47,12 +53,7 @@ const FacePile: FC = ({ ? (m) => : (m) => ( - + ), ); @@ -65,7 +66,7 @@ const FacePile: FC = ({ ); const content = ( - + {pileContents} {children} diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index d37ff18a76..6f4620b637 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -55,6 +55,7 @@ import { RoomKnocksBar } from "./RoomKnocksBar"; import { isVideoRoom } from "../../../utils/video-rooms"; import { notificationLevelToIndicator } from "../../../utils/notifications"; import { CallGuestLinkButton } from "./RoomHeader/CallGuestLinkButton"; +import { ButtonEvent } from "../elements/AccessibleButton"; export default function RoomHeader({ room, @@ -364,16 +365,7 @@ export default function RoomHeader({ )} {!isDirectMessage && ( - { - RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList); - e.stopPropagation(); - }} - > + { + RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList); + e.stopPropagation(); + }} + aria-label={_t("common|n_members", { count: memberCount })} > {formatCount(memberCount)}