Skip to content

docs(tabs): describe interaction difference between tab-group & nav-tab-bar #16563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/material/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,16 @@ duration can be configured globally using the `MAT_TABS_CONFIG` injection token.
<!-- example(tab-group-animations) -->

### Accessibility
`<mat-tab-group>` and `<mat-nav-tab-bar>` use different interaction patterns. The
`<mat-tab-group>` component combines `tablist`, `tab`, and `tabpanel` into a single component with
the appropriate keyboard shortcuts. The `<mat-nav-tab-bar>`, however, use a _navigation_ interaction
pattern by using a `<nav>` element with anchor elements as the "tabs". The difference
between these two patterns comes from the fact one updates the page URL while the other does not.

#### Labels
Tabs without text or labels should be given a meaningful label via `aria-label` or
`aria-labelledby`. For `MatTabNav`, the `<nav>` element should have a label as well.


#### Keyboard interaction

| Shortcut | Action |
Expand Down