Skip to content

Commit c978039

Browse files
committed
Spinner audit: changeset page-load bound, shorter comments
1 parent fc7a6a1 commit c978039

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

‎.changeset/spinner-audit.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
'@astryxdesign/core': patch
33
---
44

5-
[fix] Spinner: an empty or blank `aria-label` or string `label` no longer leaves the loading indicator with no accessible name. An empty or blank value counts as unset, so the indicator is named by a string label that is not empty or blank, else the translated "Loading". A standalone Spinner that shows no label text and had an empty or blank name now announces "Loading"; one with label text still announces that text. To silence a Spinner inside a control that already reports that it is busy, hide it with `aria-hidden`, as the docs now say.
5+
[fix] Spinner: an empty or blank `aria-label` or string `label` no longer leaves the loading indicator with no accessible name. An empty or blank value counts as unset, so the indicator is named by a string label that is not empty or blank, else the translated "Loading". A standalone Spinner that shows no label text and had an empty or blank name now announces "Loading" when it appears after page load, as any other standalone Spinner does; one with label text still announces that text. To silence a Spinner inside a control that already reports that it is busy, hide it with `aria-hidden`, as the docs now say.
66

77
@cixzhang

‎packages/core/src/Spinner/Spinner.tsx‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ const styles = stylex.create({
185185
// the wrapper — a custom property inherits either way.
186186
[RESOLVED_DIAMETER]: 'var(--spinner-diameter)',
187187
[RESOLVED_STROKE]: 'var(--spinner-stroke-width)',
188-
// The size of the box, composed here and applied as an inline style at the
189-
// element, so that the box and the drawn ring come from the same two vars
190-
// and a themed size moves both together. It stays an inline style: a rule
191-
// would let a caller's `style={{width}}` override the box.
188+
// The box size is composed here and applied as an inline style. The box
189+
// and the ring read the same two vars, so a themed size moves both. A
190+
// rule instead would let a caller's `style={{width}}` override the box.
192191
[BOX_SIZE]: `calc(var(${RESOLVED_DIAMETER}) + var(${RESOLVED_STROKE}) * 2)`,
193192

194193
// A flex host must not compress the box: the ring draws at its own size,
@@ -211,12 +210,10 @@ const styles = stylex.create({
211210
// One expression, one source of truth, resolves in any layout.
212211
width: `var(${BOX_SIZE})`,
213212
height: `var(${BOX_SIZE})`,
214-
// The svg is sized in CSS (100% of the span) rather than from the size
215-
// constant, so one user unit is one CSS pixel AND the frame follows a
216-
// themed diameter: the span's box is `diameter + 2 x stroke`, both public
217-
// vars, so ring and frame move together. An svg sized from the constant
218-
// is larger than the box when a theme changes the diameter, and an
219-
// overflowing grid item aligns to start rather than centre.
213+
// The svg is sized in CSS, 100% of the span, so one user unit is one CSS
214+
// pixel and the frame follows a themed diameter. An svg sized from the
215+
// size constant is larger than the box when a theme changes the diameter,
216+
// and an overflowing grid item aligns to start rather than centre.
220217
overflow: 'visible',
221218
},
222219
// The rotor is the frame's size, so it turns about the ring's centre.

0 commit comments

Comments
 (0)