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

Commit 522ef92

Browse files
committed
docs(cb-a11y): Content - Form controls
1 parent b8ede33 commit 522ef92

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,24 @@ code-example(language="html" escape="html" format="linenums").
308308
</div>
309309
</a11y-select>
310310

311+
:marked
312+
### Explicit labelling
313+
314+
There could be a number of reasons that you prefer not to use the `implicit labelling` syntax described above. Maybe
315+
you need to write the input outside the lable for positioning or styling purposes. Or maybe your elements are
316+
already furnished with id's.
317+
318+
As alternative you can also use the `explicit labelling` syntax. For this syntax you are required to add an `id` to
319+
the `HTML` form element to connect the label.
320+
321+
This is also the reason why `implicit labelling` could come in very useful with reusable Angular&nbsp;2 components.
322+
Remember that an `id` should be unique on a page, and any component where `explicit labelling` is used, will need
323+
a way to add unique id's to the elements.
324+
325+
This time we will only look at adding an `explicit label` to an `INPUT`. The examples under the `implicit labelling`
326+
section can easily be adjusted once you know how this works.
327+
328+
311329
.l-main-section
312330
<a id="keyboard-shortcuts"></a>
313331
:marked

0 commit comments

Comments
 (0)