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

Commit 31b1315

Browse files
committed
docs(cb-a11y): Content - Form controls
1 parent 96e0469 commit 31b1315

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

public/docs/_examples/cb-a11y/ts/a11y.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,26 @@ hr {
1010
.background-contrast {
1111
background-color: #0143A3;
1212
color: #fff;
13-
}
13+
}
14+
15+
/*This is a copy of the .form-control class in bootstrap
16+
to enable adding it to all form controls without to much
17+
noise in the examples.*/
18+
/*div:not(.radio):not(.checkbox) input, textarea, select {*/
19+
/*display: block;*/
20+
/*width: 100%;*/
21+
/*height: 34px;*/
22+
/*padding: 6px 12px;*/
23+
/*font-size: 14px;*/
24+
/*line-height: 1.42857143;*/
25+
/*color: #555;*/
26+
/*background-color: #fff;*/
27+
/*background-image: none;*/
28+
/*border: 1px solid #ccc;*/
29+
/*border-radius: 4px;*/
30+
/*-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);*/
31+
/*box-shadow: inset 0 1px 1px rgba(0,0,0,.075);*/
32+
/*-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;*/
33+
/*-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;*/
34+
/*transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;*/
35+
/*}*/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
<!-- #docregion-->
12
<div class="form-group ">
2-
<!-- #docregion cb-a11y-form-controls-input -->
33
<label>
44
<ng-content></ng-content>
55
<input class="form-control">
66
</label>
7-
<!--#enddocregion-->
8-
</div>
7+
</div>
8+
<!--#enddocregion-->

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,23 @@ include ../_util-fns
6060

6161
So without further ado, let us see how easy it is to get big accessibility gains in our applications!
6262

63+
.l-main-section
64+
:marked
65+
## Important note on styling in this chapter
66+
67+
The `container`, `row`, `col-xs-12`, `checkbox`, `radio`, `form-group`, `form-control`, and `btn` classes
68+
come from [Twitter Boostrap](http://getbootstrap.com/css/). This is a purely cosmetic addition to prettify
69+
the examples and to also show how in `a11y`, the content of our `HTML` is as important as the final presentation.
70+
71+
Just because something looks good, does not mean it is accessible. But here we strive to achieve both!
72+
73+
.callout.is-important
74+
header Angular Pages Do Not Require A Style Library
75+
:marked
76+
Angular makes no use of the `container`, `row`, `col-xs-12`, `checkbox`, `radio`, `form-group`, `form-control`,
77+
and `btn` classes or the styles of any external library. Angular apps can use any CSS library
78+
... or none at all.
79+
6380
.l-main-section
6481
<a id="toc"></a>
6582
:marked
@@ -111,13 +128,14 @@ code-example(language="html" escape="html").
111128
</label>
112129

113130
:marked
114-
Of course, here the `INPUT` element can be any native `HTML` form element. So let us see how we would use this with
115-
the commonly used native `HTML` form elements in Angular&nbsp;2.
131+
Of course, here the `INPUT` element can be any native `HTML` form element.
132+
133+
So let us see how we would write the commonly used native `HTML` form elements in our Angular&nbsp;2 components.
116134

117135
:marked
118136
#### Inputs
119137

120-
+makeExample('cb-a11y/ts/app/form-controls/a11y-input.component.html', 'cb-a11y-form-controls-input')
138+
+makeExample('cb-a11y/ts/app/form-controls/a11y-input.component.html')
121139

122140
:marked
123141
#### Textareas

0 commit comments

Comments
 (0)