DocumentationAccessibility

Open in Create
Search
astronomic.dev

Accessibility

The rules every part follows, what the kit tests, and what you still need to do on your pages.

Astronomic UI is built so that a page made from its parts works with a keyboard, a screen reader and a touch screen, and reads clearly in every preset, light and dark. The parts handle the structure. Your content (alt text, headings, link words, labels) is still yours to write.

This page lists what the kit does, what it tests, and what is left for you. It is not a compliance certificate: check your finished site with your own content.

What the kit does

Native elements first

Parts use the HTML element made for the job: <button> for actions, <a> for links, native radios and checkboxes in filters, and a native <dialog> for the lightbox, the mobile menu and search. A browser and a screen reader already know how these work, so they need little script to be correct.

Keyboard

  • Every control can be reached with Tab. Links open with Enter, buttons work with Enter or Space. A radio group or a tab list is one Tab stop, and the arrow keys move inside it, as native radios do.
  • The lightbox and the mobile menu keep focus inside while open. Escape closes them, and focus goes back to the page: to the menu button, or to the link of the last image shown.
  • Where a part has its own keys, its page lists them under Accessibility, with notes on names, states and order.

Focus rings

Interactive parts draw one focus ring, shown on keyboard focus (focus-visible). A click does not draw it. By default it is a 2px solid outline in the accent color, 2px from the element. Pro Tabs draw it inside the tab, and focus-on-image adds a dark halo around the outline so it shows on any photo.

On a colored surface the default ring may not show, so each surface brings its own ring utility: focus-on-band, focus-on-cta, focus-on-image, focus-on-inverse and focus-on-accent. Put the matching one on the area when you place parts on that surface.

Contrast in every preset and mode

The kit checks text contrast in a browser test, in every preset, light and dark:

WhatNeeds
Body text and Button text4.5:1
Large text (24px, or 18.66px bold)3:1
Focus rings, icons and edges, where tested3:1
Hover statesThe same as at rest

The test reads every visible text in every part's previews, in every preset, in both modes. It skips disabled controls and text on an image, which has its own check over a black and a white image. Each colored surface (band, CTA band, photo scrim, inverse panel, accent strip) has its own test for its text, its Buttons and its ring.

Tip

Making your own preset? The Contrast group in Create shows the WCAG ratio of each color pair it checks, in the mode you are editing.

Touch targets

Small controls that keep a small look, such as an icon link, a topic pill or the mode toggle, get a hit area of at least 44 × 44px. Controls that wrap onto more lines grow taller instead of shrinking under 44px.

Motion

The kit's effects stop for a reader who asks their device for reduced motion, and a page with a marquee or a video loop can carry a pause button. See Motion.

Names and states

  • An icon-only control has a name a screen reader reads, set with a *Label prop (closeLabel, removeLabel and others). Every *Label prop is an accessible name.
  • Toggles carry their state in aria-pressed, the current page in aria-current="page", and the current step in aria-current="step".
  • Decorative copies, such as a marquee's second track, are hidden from screen readers and cannot be focused.

What you still need to do

The kit cannot write your content. These are yours on every page.

Your jobWhat to do
Alt textWrite alt text that says what each image shows. Use alt="" only when the image adds nothing to the text beside it.
HeadingsOne h1 per page. A hero's heading is h1 by default; set headingTag on later heroes and sections so the levels go in order (h2, then h3).
Link and button wordsSay where a link goes or what a button does. "Read the case study" works; "Click here" does not.
Form labelsGive every field a label that says what to enter. Use labelHidden only when a heading right beside the field already says it.
Your own colorsIf you change a preset's colors, check the ratios again (Create shows them).
LanguageSet lang on <html>, and pass your own words to label props (label, *Label) when your site is not in English.
Your own motionWrite it with the motion-ok variant so it stops for reduced motion. See Motion.

Note

Test the finished page with the keyboard alone (Tab, Shift+Tab, Enter, Escape) and with a screen reader, such as VoiceOver on a Mac or NVDA on Windows.

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.