field-text
フォーム 実際のフォームが取らせる状態で、人が文字を入力する欄を並べています。どれも余白のある rst-box の中に入っています。フォームを入れるカードがそれだからです。
ラベル付きのテキスト入力がひとつ。必須マークの星は aria-hidden で、プログラムに伝わる合図は入力欄の required 属性です。
どの例も実際に動きますが、リンクはどこにも移動しません。 HTML にはコピーできるマークアップがあります。
素のまま
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="ft_bare" >タイトル</label >
<input rst-input id ="ft_bare" name ="ft_bare" type ="text" >
</div >
ヒントつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="ft_hint" >見出し</label >
<input rst-input id ="ft_hint" name ="ft_hint" type ="text" aria-describedby ="ft_hint-hint" >
<small rst-field-hint id ="ft_hint-hint" >一覧に表示されます。</small >
</div >
必須
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="ft_required" >表示名 <span rst-field-required aria-hidden ="true" >*</span ></label >
<input rst-input id ="ft_required" name ="ft_required" type ="text" autocomplete ="nickname" required >
</div >
エラーつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="ft_error" >タイトル</label >
<input rst-input id ="ft_error" name ="ft_error" type ="text" value ="リリースノート" aria-invalid ="true" aria-describedby ="ft_error-error" >
<small rst-field-error id ="ft_error-error" >同じタイトルの投稿がすでにあります。</small >
</div >
見出しの項目
フォームの主要な項目、たとえばタイトルや名前には rst-input="primary" を付けると、入力欄がより目立ちます。
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="ft_primary" >何のイベントですか?</label >
<input rst-input ="primary" id ="ft_primary" name ="ft_primary" type ="text" value ="四半期の取締役会" >
</div >