Use nav for new room list and label sections (#30134)
* Use nav for new room list and label sections The old room list had a nav element but it was missed in the new one, so add it and albel the sections. Also remove the test ID and use this instead. * Update snapshots * Use the function we define above
This commit is contained in:
@@ -315,7 +315,7 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement {
|
||||
<div className="mx_RoomView mx_RoomView--local">
|
||||
<ErrorBoundary>
|
||||
<RoomHeader room={room} />
|
||||
<main className="mx_RoomView_body" ref={props.roomView}>
|
||||
<main className="mx_RoomView_body" ref={props.roomView} aria-label={_t("room|room_content")}>
|
||||
<FileDropTarget parent={props.roomView.current} onFileDrop={props.onFileDrop} />
|
||||
<div className="mx_RoomView_timeline">
|
||||
<ScrollPanel className="mx_RoomView_messagePanel" resizeNotifier={props.resizeNotifier}>
|
||||
|
||||
@@ -13,6 +13,7 @@ import { RoomListSearch } from "./RoomListSearch";
|
||||
import { RoomListHeaderView } from "./RoomListHeaderView";
|
||||
import { RoomListView } from "./RoomListView";
|
||||
import { Flex } from "../../../utils/Flex";
|
||||
import { _t } from "../../../../languageHandler";
|
||||
|
||||
type RoomListPanelProps = {
|
||||
/**
|
||||
@@ -30,11 +31,11 @@ export const RoomListPanel: React.FC<RoomListPanelProps> = ({ activeSpace }) =>
|
||||
|
||||
return (
|
||||
<Flex
|
||||
as="section"
|
||||
as="nav"
|
||||
className="mx_RoomListPanel"
|
||||
data-testid="room-list-panel"
|
||||
direction="column"
|
||||
align="stretch"
|
||||
aria-label={_t("room_list|list_title")}
|
||||
>
|
||||
{displayRoomSearch && <RoomListSearch activeSpace={activeSpace} />}
|
||||
<RoomListHeaderView />
|
||||
|
||||
Reference in New Issue
Block a user