Skip to content

A Svelte component for having accessible screen reader text that's invisible to other users. Useful for explaining parts of a UI that rely on icons or other visual, non-written cues. Ported from Josh Comeau's component for React: https://www.joshwcomeau.com/snippets/react-components/visually-hidden/

License

Notifications You must be signed in to change notification settings

jdhines/svelte-visually-hidden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Accessible Visually Hidden Component

A Svelte component for having accessible screen reader text that's invisible to other users. Useful for explaining parts of a UI that rely on icons or other visual, non-written cues.

Ported from Josh Comeau's Visually Hidden component for React.

Usage

You can copy-paste the code from VisuallyHidden.svelte to use in your project. Besides Svelte there's no other dependencies.

  <VisuallyHidden custom-prop="custom">
    Create a new message
  </VisuallyHidden>

About

A Svelte component for having accessible screen reader text that's invisible to other users. Useful for explaining parts of a UI that rely on icons or other visual, non-written cues. Ported from Josh Comeau's component for React: https://www.joshwcomeau.com/snippets/react-components/visually-hidden/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages