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

Commit

Permalink
Fix lack of screen reader indication when triggering auto complete (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Apr 21, 2023
1 parent be5928c commit fdfe800
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit fdfe800

Please sign in to comment.