Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Tassinari <[email protected]>
Co-authored-by: Matt <[email protected]>
  • Loading branch information
3 people authored May 11, 2020
1 parent c2d5308 commit 8152922
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/src/pages/components/tabs/AccessibleTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ TabPanel.propTypes = {
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
backgroundColor: theme.palette.background.paper,
},
}));

Expand Down
8 changes: 4 additions & 4 deletions docs/src/pages/components/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ Tab labels may be either all icons or all text.

(WAI-ARIA: https://www.w3.org/TR/wai-aria-practices/#tabpanel)

This section lists necessary steps to provide necessary information for assistive technology:
The following steps are needed in order to provide necessary information for assistive technologies:

1. label `Tabs` via `aria-label` or `aria-labelledby`
1. Label `Tabs` via `aria-label` or `aria-labelledby`.
2. `Tab`s need to be connected to their
corresponding `[role="tabpanel"]` by setting the correct `id`, `aria-controls` and `aria-labelledby`
corresponding `[role="tabpanel"]` by setting the correct `id`, `aria-controls` and `aria-labelledby`.

An example for the current implementation can be found in the demos on this page. We've also published an experimental API in `@material-ui/lab` that does not require
extra work.

### Keyboard navigation

The components implement keyboard navigation using the "manual activation" behavior. If you want to switch to the
"selection automatically follows focus" behavior you have pass `selectionFollowsFocus` to the `Tabs` component. The WAI-ARIA authoring practices have a detailed guide on [how to decide then to make selection automatically follow focus](https://www.w3.org/TR/wai-aria-practices/#kbd_selection_follows_focus).
"selection automatically follows focus" behavior you have pass `selectionFollowsFocus` to the `Tabs` component. The WAI-ARIA authoring practices have a detailed guide on [how to decide when to make selection automatically follow focus](https://www.w3.org/TR/wai-aria-practices/#kbd_selection_follows_focus).

### Demo

Expand Down

0 comments on commit 8152922

Please sign in to comment.