🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@substrate-system/a11y

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate-system/a11y

Accessibility helpers

latest
Source
npmnpm
Version
0.0.17
Version published
Weekly downloads
271
48.09%
Maintainers
1
Weekly downloads
 
Created
Source

a11y

tests semantic versioning Common Changelog dependencies install size GZip size license

Factoring out some common CSS utilities, so there is less duplication across projects.

featuring

Contents

install

npm i -S @substrate-system/a11y

Use

This package exposes CSS only.

example

Put the relevant classes in your HTML.

<button>
  <svg><!--  icon here  --></svg>
  <span class="visually-hidden">My Cool Button text</span>
</button>

Bundler

If using a bundler, import the package as normal.

import '@substrate-system/a11y'

Or import specific things

import '@substrate-system/a11y/visually-hidden'

Or minified:

import '@substrate-system/a11y/min'

CSS imports

Import in CSS:

@import url("../node_modules/@substrate-system/a11y/dist/index.min.css");

If you don't want to use a bundler, this package exposes minified CSS files too. You can copy them to a location that is accessible to your web server, then link to them directly in HTML.

copy

cp ./node_modules/@substrate-system/a11y/dist/index.min.css ./public/a11y.css

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="./a11y.css">
</head>
</html>

API

This package exposes CSS that will look for the following classes.

visually-hidden

Use this to create accessible buttons with no visible text.

See this article.

Bundler

import '@substrate-system/a11y/visually-hidden'

CSS Import

@import url("../node_modules/@substrate-system/a11y/dist/visually-hidden.min.css");

example

<button>
    <svg><!--  icon here  --></svg>
    <span class="visually-hidden">Button text</span>
</button>

prefers-reduced-motion

Disable smooth scrolling if the prefers-reduced-motion media query is set.

Bundler

import '@substrate-system/a11y/reduced-motion'

CSS Import

@import url("../node_modules/@substrate-system/a11y/dist/reduced-motion.min.css");

see also

Keywords

a11y

FAQs

Package last updated on 02 Dec 2025

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