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

Commit

Permalink
fix(getters): compute aria-autocomplete based on the props
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Feb 12, 2020
1 parent 0deb9a1 commit 9ea5042
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/autocomplete-core/propGetters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function getPropGetters<TItem>({
const { inputElement, ...rest } = providedProps;

return {
'aria-autocomplete': 'both',
'aria-autocomplete': props.showCompletion ? 'both' : 'list',
'aria-activedescendant':
store.getState().isOpen && store.getState().highlightedIndex >= 0
? `${props.id}-item-${store.getState().highlightedIndex}`
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-core/types/propGetters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type GetInputProps = (props: {
autoCorrect: 'on' | 'off';
autoCapitalize: 'on' | 'off';
spellCheck: boolean;
'aria-autocomplete': 'both';
'aria-autocomplete': 'none' | 'inline' | 'list' | 'both';
'aria-activedescendant': string | null;
'aria-controls': string | null;
'aria-labelledby': string;
Expand Down

0 comments on commit 9ea5042

Please sign in to comment.