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

Commit fdfe800

Browse files
authored
Fix lack of screen reader indication when triggering auto complete (#10664)
1 parent be5928c commit fdfe800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/components/views/rooms/BasicMessageComposer.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
798798
};
799799

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

0 commit comments

Comments
 (0)