Fix lack of screen reader indication when triggering auto complete (#10664)
This commit is contained in:
parent
be5928cb64
commit
fdfe800b2c
1 changed files with 2 additions and 2 deletions
|
@ -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!);
|
||||
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue