Files
wdi-dashboard/node_modules/@chakra-ui/visually-hidden/README.md
2024-08-16 15:06:52 +05:30

37 lines
778 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# @chakra-ui/visually-hidden
The visually hidden component styles itself so that its content is not visible,
but it is available to assistive technologies like screen readers and other text
to speech programs.
## Installation
```sh
yarn add @chakra-ui/visually-hidden
# or
npm i @chakra-ui/visually-hidden
```
## Import component
```jsx
import { VisuallyHidden } from "@chakra-ui/visually-hidden"
```
## Basic usage
```jsx
// it renders a `span` by default
<VisuallyHidden>This content will be hidden on screen</VisuallyHidden>
// for visually hidden input fields
<VisuallyHiddenInput type="checkbox" defaultChecked/>
```
## References
- https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
- https://a11yproject.com/posts/how-to-hide-content/