Socket
Socket
Sign inDemoInstall

@chakra-ui/visually-hidden

Package Overview
Dependencies
2
Maintainers
2
Versions
411
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/visually-hidden


Version published
Weekly downloads
426K
decreased by-21.74%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @chakra-ui/visually-hidden?

@chakra-ui/visually-hidden is a utility component from the Chakra UI library that allows you to visually hide elements while keeping them accessible to screen readers. This is particularly useful for improving accessibility in web applications.

What are @chakra-ui/visually-hidden's main functionalities?

Visually Hidden Text

This feature allows you to hide text visually while keeping it accessible to screen readers. This is useful for providing additional context to screen reader users without displaying the text on the screen.

<VisuallyHidden>This text is hidden but accessible to screen readers</VisuallyHidden>

Visually Hidden Input

You can use the VisuallyHidden component to hide form elements like inputs while keeping them accessible. This is useful for hidden form fields that need to be read by screen readers.

<VisuallyHidden as="input" type="text" value="hidden input" />

Other packages similar to @chakra-ui/visually-hidden

Readme

Source

@chakra-ui/visually-hidden

The visually hidden component styles itself so that it’s content is not visible, but it is available to assistive technologies like screen readers and other text to speech programs.

Installation

yarn add @chakra-ui/visually-hidden

# or

npm i @chakra-ui/visually-hidden

Import component

import { VisuallyHidden } from "@chakra-ui/visually-hidden"

Basic usage

// 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/

Keywords

FAQs

Last updated on 22 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc