フォーム
Fieldset
関連するフォーム部品をまとめるグループ。ネイティブの fieldset と legend を使うので、disabled を指定すれば中の部品をまとめて無効化できます。説明文も添えられます。
ReactVueWeb Components
Storybook で見る プレイグラウンド
使用例
<Fieldset legend="Shipping address" description="Where should we send your order?">
<FormField label="Street"><Input /></FormField>
<FormField label="City"><Input /></FormField>
</Fieldset> 設定できる項目
| 名前 | 型 | 既定値 | 説明 |
|---|---|---|---|
legend 必須 | ReactNode | — | Legend text — the accessible group name, rendered inside `<legend>`. |
description | ReactNode | — | Optional description displayed below the legend. |
disabled | boolean | — | Disabled state propagated natively to all descendant form controls via the HTML `disabled` attribute on `<fieldset>`. |
children 必須 | ReactNode | — | Form controls to group. |
アクセシビリティ
- 文字と背景の明るさの差をしっかり取り、読みやすくしています。ライトでもダークでも、見やすさの国際基準 WCAG の最高ランク AAA(明るさの差が 7:1 以上)を満たします。
- マウスがなくても、キーボードだけですべての操作ができます。
- いまどこを操作しているかを示す枠(フォーカスの囲み)が、常にはっきり見えます。
- 利用者が「画面の動きを減らす」設定にしているときは、過剰なアニメーションを止めます。
どのコンポーネントも、だれにとっても使いやすいように、見やすさの国際基準 WCAG の最高ランク AAA(WCAG 2.1 AAA)を満たすよう作っています。