This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
public/docs/ts/latest/cookbook Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,39 @@ include ../_util-fns
95
95
:marked
96
96
### Implicit labelling
97
97
98
- Blah
98
+ Firstly we will look at the absolute easiest way to furnish your form controls with accessible labels, and that is
99
+ with a technique called `implicit labelling`.
99
100
101
+ With this technique you get all the benefits of `a11y` for your controls by simply writing your `HTML` in a specific way.
102
+
103
+ With this writing style you simply wrap the `HTML` element inside a label tag and you are done. There is no need to
104
+ generate or suppply field id's as you will see with the other methods.
105
+
106
+ Your general `HTML` becomes:
107
+
108
+ code-example( language ="html" escape ="html" ) .
109
+ <label >label text
110
+ <input >
111
+ </label >
112
+
113
+ :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 2.
116
+
117
+ :marked
118
+ #### Inputs
119
+
120
+ :marked
121
+ #### Textareas
122
+
123
+ :marked
124
+ #### Checkboxes
125
+
126
+ :marked
127
+ #### Radiobuttons
128
+
129
+ :marked
130
+ #### Select lists
100
131
101
132
102
133
.l-main-section
You can’t perform that action at this time.
0 commit comments