Improve new room header accessibility (#12725)
* Fix room header topic not showing on keyboard navigation whilst still using tabstops Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix keyboard activation of the room header FacePile Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix label on room header facepile Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update src/components/views/elements/FacePile.tsx Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
b2a89151e6
commit
466f37a83d
3 changed files with 25 additions and 24 deletions
|
@ -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({
|
|||
)}
|
||||
</Flex>
|
||||
{!isDirectMessage && (
|
||||
<BodyText
|
||||
as="div"
|
||||
size="sm"
|
||||
weight="medium"
|
||||
aria-label={_t("common|n_members", { count: memberCount })}
|
||||
onClick={(e: React.MouseEvent) => {
|
||||
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList);
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
<BodyText as="div" size="sm" weight="medium">
|
||||
<FacePile
|
||||
className="mx_RoomHeader_members"
|
||||
members={members.slice(0, 3)}
|
||||
|
@ -381,6 +373,11 @@ export default function RoomHeader({
|
|||
overflow={false}
|
||||
viewUserOnClick={false}
|
||||
tooltipLabel={_t("room|header_face_pile_tooltip")}
|
||||
onClick={(e: ButtonEvent) => {
|
||||
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList);
|
||||
e.stopPropagation();
|
||||
}}
|
||||
aria-label={_t("common|n_members", { count: memberCount })}
|
||||
>
|
||||
{formatCount(memberCount)}
|
||||
</FacePile>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue