Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const AutocompletePage = () => {
<Typography data-testId="basic-autocomplete-selected-id">Selected id is {majorId}</Typography>
<Autocomplete
label="Pick a major"
dismissLabel='Clear input'
dismissAriaLabel='Clear input'
onSelectionChange={onSelectionChange}
data-testId="basic-autocomplete"
>
Expand Down
8 changes: 4 additions & 4 deletions packages/flourish-ui/src/components/Autocomplete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export interface AutocompleteProps<T extends object>
label: string
/** Whether to display the label, if false will attach the label with aria-label. */
isLabelVisible?: boolean
/** Accessible label for the component's clear button. */
dismissLabel: string
/** Label of the clear icon button for assistive technologies. */
dismissAriaLabel: string
}

export interface AutocompleteItemProps
Expand All @@ -37,7 +37,7 @@ export const AutocompleteItem = ({
export const Autocomplete = <T extends object>({
label,
isLabelVisible = true,
dismissLabel,
dismissAriaLabel,
children,
'data-testId': testId,
...props
Expand Down Expand Up @@ -70,7 +70,7 @@ export const Autocomplete = <T extends object>({
{inputValue.length > 0 && (
<Button
className="f-searchbar-clear-btn"
label={dismissLabel}
label={dismissAriaLabel}
variant="icon"
icon="close"
onClick={onDelete}
Expand Down