mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 17:49:19 +00:00
Fix regression around the room list treeview keyboard a11y (#8385)
This commit is contained in:
committed by
GitHub
parent
73e8387799
commit
86419b1925
@@ -616,11 +616,8 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
|
|||||||
public focus(): void {
|
public focus(): void {
|
||||||
// focus the first focusable element in this aria treeview widget
|
// focus the first focusable element in this aria treeview widget
|
||||||
const treeItems = this.treeRef.current?.querySelectorAll<HTMLElement>('[role="treeitem"]');
|
const treeItems = this.treeRef.current?.querySelectorAll<HTMLElement>('[role="treeitem"]');
|
||||||
if (treeItems) {
|
if (!treeItems) return;
|
||||||
return;
|
[...treeItems].find(e => e.offsetParent !== null)?.focus();
|
||||||
}
|
|
||||||
[...treeItems]
|
|
||||||
.find(e => e.offsetParent !== null)?.focus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user