What's new
0.3.0
Values screenreaders read the way you mean them, headings in Disclosure, dialogs in Popover, and the rest of the accessibility audit.
0.3.0 finishes the accessibility audit 0.2.0 began. Sliders, meters and ratings can say what their numbers mean, Disclosure and Popover take the roles they're used for, and Calendar, File Drop and Command Palette say what just happened. It's a minor release because Splitter's separator moved its focus, so check how you style it.
- 3 new features
- 6 fixes
- 7 components fixed
- 1 change to check
TL;DR The short version
- Slider, Range Slider, Meter, Progress and Rating take
formatValue, so a screenreader reads "$40" or "3 of 5 GB" rather than a bare number. - Disclosure's label can be a heading, and a Popover with a
labelis a dialog. - Calendar ranges, File Drop and Command Palette tell screenreaders what just happened.
- Splitter's separator is a native range input inside, so phone screenreaders move it with a swipe.
- Splitter's focus ring moves to a
focus-visiblepart.
New features
-
Values that read right
formatValue, a function of the value whose result screenreaders read, such as "$40" or "3 stars", in Slider, Range Slider, Meter, Progress and Rating. -
Disclosure headings
heading-levelputs Disclosure's label in a heading of that level, as the APG's accordion does, so it's in a screenreader's list of headings. -
Popover dialogs
With
label, a Popover is a non-modal dialog named by it, for one that holds a form or controls rather than a few words.
Fixes
The last of the accessibility audit, and two parts back in the manifest. A line each, and the components it's in.
Screenreaders
-
A range's first day, and then the whole range, are announced as they're picked.
-
A drop says how many files were added, and how many were left out.
-
How many results are left is announced once typing pauses, as in Combobox.
Touch and target size
Editors and docs
-
The thumbs' parts are listed in the elements manifest again.
Before you upgrade
One change can break what you have. It's why this is a minor release.
-
Splitter's focus ring
The separator holds a hidden range input that takes focus, so it isn't
[role=separator]and doesn't match:focus-visible. Style its ring through thefocus-visiblepart.Before slab-splitter::part(separator):focus-visible { outline: 3px solid; }After slab-splitter::part(separator focus-visible) { outline: 3px solid; }
Upgrade
pnpm add slab-elements@0.3.0
Every change, in full, is in the release notes.