Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 0cc1619

Browse files
committed
docs(cb-a11y): Content - Form controls
1 parent 07ada0b commit 0cc1619

File tree

6 files changed

+87
-5
lines changed

6 files changed

+87
-5
lines changed

public/docs/_examples/cb-a11y/ts/app/form-controls/a11y-checkboxes.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!--#docregion-->
12
<fieldset class="form-group row">
23
<legend class="col-xs-12">
34
<ng-content></ng-content>
@@ -8,4 +9,5 @@
89
{{checkbox.name}}
910
</label>
1011
</div>
11-
</fieldset>
12+
</fieldset>
13+
<!--#enddocregion-->

public/docs/_examples/cb-a11y/ts/app/form-controls/a11y-form-controls.component.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@ <h3>Implicit labeling</h3>
1212
<a11y-input>Type something:</a11y-input>
1313
<!--#enddocregion-->
1414

15+
<!-- #docregion cb-a11y-form-controls-textarea-usage -->
1516
<a11y-textarea>Type some text:</a11y-textarea>
17+
<!--#enddocregion-->
1618

19+
<!-- #docregion cb-a11y-form-controls-checkboxes-usage -->
1720
<a11y-checkboxes [checkboxModel]="checkBoxes" [checkboxName]="'likes'">
1821
What do you like most about Angular 2?
1922
</a11y-checkboxes>
23+
<!--#enddocregion-->
2024

25+
<!-- #docregion cb-a11y-form-controls-radiobuttons-usage -->
2126
<a11y-radiobuttons [radiobuttonModel]="radioButtons" [radiobuttonName]="'language'">
2227
Choose your favourite Angular 2 language:
2328
</a11y-radiobuttons>
29+
<!--#enddocregion-->
2430

31+
<!-- #docregion cb-a11y-form-controls-select-usage -->
2532
<a11y-select [optionsModel]="selectOptions">Why are you interested in a11y?</a11y-select>
33+
<!--#enddocregion-->
2634

2735
</section>
2836
<section class="row well">

public/docs/_examples/cb-a11y/ts/app/form-controls/a11y-radiobuttons.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!--#docregion-->
12
<fieldset class="form-group row">
23
<legend class="col-xs-12">
34
<ng-content></ng-content>
@@ -8,4 +9,5 @@
89
{{radiobutton.name}}
910
</label>
1011
</div>
11-
</fieldset>
12+
</fieldset>
13+
<!--#enddocregion-->
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
<!--#docregion-->
12
<div class="form-group">
23
<label><ng-content></ng-content>
34
<select class="form-control">
45
<option *ngFor="#option of optionsModel" [value]="option.value">{{option.name}}</option>
56
</select>
67
</label>
7-
</div>
8+
</div>
9+
<!--#enddocregion-->
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
<!-- #docregion-->
12
<div class="form-group">
23
<label><ng-content></ng-content>
34
<textarea class="form-control"></textarea>
45
</label>
5-
</div>
6+
</div>
7+
<!--#enddocregion-->

public/docs/ts/latest/cookbook/a11y.jade

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ code-example(language="html" escape="html").
150150
:marked
151151
Which is then rendered as:
152152

153-
code-example(language="html" escape="html").
153+
code-example(language="html" escape="html" format="linenums").
154154
<a11y-input>
155155
<div class="form-group ">
156156
<label>
@@ -163,9 +163,75 @@ code-example(language="html" escape="html").
163163
:marked
164164
#### Textareas
165165

166+
Your component template:
167+
168+
+makeExample('cb-a11y/ts/app/form-controls/a11y-textarea.component.html')
169+
170+
:marked
171+
Used as:
172+
173+
+makeExample('cb-a11y/ts/app/form-controls/a11y-form-controls.component.html','cb-a11y-form-controls-textarea-usage')
174+
175+
:marked
176+
Which is then rendered as:
177+
178+
code-example(language="html" escape="html" format="linenums").
179+
<a11y-textarea>
180+
<div class="form-group">
181+
<label>Type some text:
182+
<textarea class="form-control"></textarea>
183+
</label>
184+
</div>
185+
</a11y-textarea>
186+
166187
:marked
167188
#### Checkboxes
168189

190+
Your component template:
191+
192+
+makeExample('cb-a11y/ts/app/form-controls/a11y-checkboxes.component.html')
193+
194+
:marked
195+
Used as:
196+
197+
+makeExample('cb-a11y/ts/app/form-controls/a11y-form-controls.component.html','cb-a11y-form-controls-checkboxes-usage')
198+
199+
:marked
200+
Which is then rendered as:
201+
202+
code-example(language="html" escape="html" format="linenums").
203+
<a11y-checkboxes>
204+
<fieldset class="form-group row">
205+
<legend class="col-xs-12">
206+
What do you like most about Angular 2?
207+
</legend>
208+
<div class="checkbox col-xs-12">
209+
<label>
210+
<input type="checkbox" value="0" name="likes">
211+
Template syntax
212+
</label>
213+
</div>
214+
<div class="checkbox col-xs-12">
215+
<label>
216+
<input type="checkbox" value="1" name="likes">
217+
Observables
218+
</label>
219+
</div>
220+
<div class="checkbox col-xs-12">
221+
<label>
222+
<input type="checkbox" value="2" name="likes">
223+
Components
224+
</label>
225+
</div>
226+
<div class="checkbox col-xs-12">
227+
<label>
228+
<input type="checkbox" value="3" name="likes">
229+
Forms
230+
</label>
231+
</div>
232+
</fieldset>
233+
</a11y-checkboxes>
234+
169235
:marked
170236
#### Radiobuttons
171237

0 commit comments

Comments
 (0)