docs(focus): Add docs for regions #8082 (#8128)

* docs(focus): Add docs for regions #8082

* docs(a11y): add more desc for focus trap
This commit is contained in:
Austin
2017-10-30 16:35:32 -05:00
committed by mmalerba
parent e703b3edd3
commit 804f925d92
+16
View File
@@ -68,6 +68,22 @@ This directive is declared in `A11yModule`.
This directive will not prevent focus from moving out of the trapped region due to mouse
interaction.
#### Regions
Regions can be declared explicitly with an initial focus element by using
the `cdkFocusRegionStart`, `cdkFocusRegionEnd` and `cdkFocusInitial` DOM attributes.
`cdkFocusInitial` specifies the element that will receive focus upon initialization of the region.
`cdkFocusRegionStart` and `cdkFocusRegionEnd` define the region within which focus will be
trapped. When using the tab key, focus will move through this region and wrap around on either end.
For example:
```html
<a mat-list-item routerLink cdkFocusRegionStart>Focus region start</a>
<a mat-list-item routerLink>Link</a>
<a mat-list-item routerLink cdkFocusInitial>Initially focused</a>
<a mat-list-item routerLink cdkFocusRegionEnd>Focus region end</a>
```
### InteractivityChecker
`InteractivityChecker` is used to check the interactivity of an element, capturing disabled,