useIsScreenReaderEnabled
- Description
- Params and Return
- Example
Hook to check if the screen reader is enabled withListener - True to add a listener to live update screen reader status, default false
Param / Return | Description |
---|---|
returns | boolean if the screen reader is on |
How to use the useIsScreenReaderEnabled component
const screenReaderEnabled = useIsScreenReaderEnabled()
const setFocus = useCallback(() => {
if (ref.current && screenReaderEnabled) {}
}