Socket
Socket
Sign inDemoInstall

@reach/visually-hidden

Package Overview
Dependencies
3
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/visually-hidden


Version published
Maintainers
4
Install size
4.73 MB
Created

Package description

What is @reach/visually-hidden?

@reach/visually-hidden is a React component that allows you to hide content visually while keeping it accessible to screen readers. This is useful for providing additional context or instructions to users who rely on assistive technologies without cluttering the visual interface.

What are @reach/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 adding extra context or instructions for screen reader users.

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

Visually Hidden Input Labels

This feature allows you to hide input labels visually while keeping them accessible to screen readers. This ensures that forms are accessible without cluttering the visual design.

<label><VisuallyHidden>Username</VisuallyHidden><input type='text' name='username' /></label>

Other packages similar to @reach/visually-hidden

Readme

Source

@reach/visually-hidden

Stable release MIT license

Docs | Source | Origin | Further reading

Provides text for screen readers that is visually hidden. It is the logical opposite of the aria-hidden attribute.

In the following example, screen readers will announce "Save" and will ignore the icon; the browser displays the icon and ignores the text.

import { VisuallyHidden } from "@reach/visually-hidden";

function Example() {
	return (
		<button>
			<VisuallyHidden>Save</VisuallyHidden>
			<span aria-hidden>💾</span>
		</button>
	);
}

FAQs

Last updated on 13 Oct 2022

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