Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix lack of screen reader indication when triggering auto complete #10664

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/views/rooms/BasicMessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
};

const { completionIndex } = this.state;
const hasAutocomplete = Boolean(this.state.autoComplete);
const hasAutocomplete = !!this.state.autoComplete;
let activeDescendant: string | undefined;
if (hasAutocomplete && completionIndex! >= 0) {
activeDescendant = generateCompletionDomId(completionIndex!);
Expand Down Expand Up @@ -828,7 +828,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
aria-multiline="true"
aria-autocomplete="list"
aria-haspopup="listbox"
aria-expanded={hasAutocomplete ? true : undefined}
aria-expanded={hasAutocomplete ? !this.autocompleteRef.current?.state.hide : undefined}
aria-owns={hasAutocomplete ? "mx_Autocomplete" : undefined}
aria-activedescendant={activeDescendant}
dir="auto"
Expand Down