@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
27 lines • 952 B
TypeScript
import { OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';
import { SelectProps } from '../interfaces';
interface OptionHolder {
option?: OptionDefinition | OptionGroup;
}
/**
* The hook produces the live region string to be announced when an option is highlighted.
* This is a workaround to account for the issues with assistive technologies.
*
* If the testing reveals no issues with the native announcements the live-region can be removed.
*/
export declare function useAnnouncement<Option extends OptionHolder>({
highlightText,
announceSelected,
highlightedOption,
getParent,
selectedAriaLabel,
renderHighlightedAriaLive
}: {
highlightText?: string;
announceSelected: boolean;
highlightedOption?: Option;
getParent: (option: Option) => undefined | OptionGroup;
selectedAriaLabel?: string;
renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;
}): string;
export {};