Accessibility

The _accessibility.scss file contains utility classes and mixins that can help you make your content more accessible.

For example, the .sr-only class is used to hide content to all users, except those visiting your website using a screen reader.

.sr-only { // content made available only to screen reader users
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

A good example of this class in use is the counter component, where we hide the "notification" label for all users (we rely on a visual approach so that it's clear the element represents a notification), but we make this content available to assistive technologies.