Spinner
fandhe-frontend-pre-styled-ui の spinner mod が提供するスタイル済み Spinner 部品です。
読み込み中を示す回転インジケータです。role="status" + aria-label(既定 "Loading")でスクリーンリーダーへ状態を伝えます。ボタン内部等、既に aria-busy で状態が伝わる文脈では装飾用途の spinner_decorative(role/aria-label なし)を使う設計です。
Demo
読み込み中表示。role="status" と aria-label でスクリーンリーダーへ状態を伝えます。
Features
- role="status" + aria-label(既定 "Loading")でスクリーンリーダーへ読み込み中を伝える(crates/pre-styled-ui/src/spinner.rs:2, 137-138, 151-152)
- spinner_decorative(別関数)は role/aria-label を持たず aria-hidden="true" のみを付与する(spinner.rs:170-171)
- colorPalette 軸でセマンティック色を選択する(spinner.rs 冒頭)
Anatomy
rootAPI Reference
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| label | &str | "Loading" | aria-label に渡すラベル文字列(spinner.rs:216-219, 227)。 |
Examples
Custom label
aria-label をカスタマイズした Spinner の例です。
Accessibility
WAI-ARIA
| Attribute | Description |
|---|---|
| role="status" + aria-label | 読み込み中であることをスクリーンリーダーへ伝える(spinner.rs:2, 151-152)。 |