Use semantically correct elements for room sublist context menu (#10831)

This commit is contained in:
Michael Telatynski 2023-05-09 12:13:55 +01:00 committed by GitHub
parent 08368860f4
commit 339e7dab18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,8 +577,8 @@ export default class RoomSublist extends React.Component<IProps, IState> {
otherSections = ( otherSections = (
<React.Fragment> <React.Fragment>
<hr /> <hr />
<div> <fieldset>
<div className="mx_RoomSublist_contextMenu_title">{_t("Appearance")}</div> <legend className="mx_RoomSublist_contextMenu_title">{_t("Appearance")}</legend>
<StyledMenuItemCheckbox <StyledMenuItemCheckbox
onClose={this.onCloseMenu} onClose={this.onCloseMenu}
onChange={this.onUnreadFirstChanged} onChange={this.onUnreadFirstChanged}
@ -593,7 +593,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
> >
{_t("Show previews of messages")} {_t("Show previews of messages")}
</StyledMenuItemCheckbox> </StyledMenuItemCheckbox>
</div> </fieldset>
</React.Fragment> </React.Fragment>
); );
} }
@ -606,8 +606,8 @@ export default class RoomSublist extends React.Component<IProps, IState> {
onFinished={this.onCloseMenu} onFinished={this.onCloseMenu}
> >
<div className="mx_RoomSublist_contextMenu"> <div className="mx_RoomSublist_contextMenu">
<div> <fieldset>
<div className="mx_RoomSublist_contextMenu_title">{_t("Sort by")}</div> <legend className="mx_RoomSublist_contextMenu_title">{_t("Sort by")}</legend>
<StyledMenuItemRadio <StyledMenuItemRadio
onClose={this.onCloseMenu} onClose={this.onCloseMenu}
onChange={() => this.onTagSortChanged(SortAlgorithm.Recent)} onChange={() => this.onTagSortChanged(SortAlgorithm.Recent)}
@ -624,7 +624,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
> >
{_t("A-Z")} {_t("A-Z")}
</StyledMenuItemRadio> </StyledMenuItemRadio>
</div> </fieldset>
{otherSections} {otherSections}
</div> </div>
</ContextMenu> </ContextMenu>