Skip to content

Commit

Permalink
matt & seb reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 31, 2019
1 parent 7cff225 commit 50bed00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
10 changes: 2 additions & 8 deletions docs/src/pages/lab/breadcrumbs/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ components: Breadcrumbs, Breadcrumb

## Custom separator

The seperator can be any valid React node.
In the following examples, we are using `"›"`, `"-"` and

```jsx
import NavigateNextIcon from '@material-ui/icons/NavigateNext';
//
seperator={<NavigateNextIcon fontSize="small" />}
```
In the following examples, we are using two string separators, and an SVG icon.

{{"demo": "pages/lab/breadcrumbs/CustomSeparator.js"}}

Expand All @@ -45,6 +38,7 @@ here is one example of how you can change the breadcrumb link design.
Be sure to add a `aria-label` description on the `Breadcrumbs` component.

The accessibility of this component relies on:

- The set of links is structured using an ordered list (`<ol>` element).
- To prevent screen reader announcement of the visual separators between links, they are hidden with `aria-hidden`.
- A nav element labeled with `aria-label` identifies the structure as a breadcrumb trail and makes it a navigation landmark so that it is easy to locate.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/Breadcrumbs/Breadcrumbs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { StandardProps } from '@material-ui/core';

export interface BreadcrumbsProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, BreadcrumbsClassKey> {
extends StandardProps<React.HTMLAttributes<HTMLElement>, BreadcrumbsClassKey> {
itemsAfterCollapse?: boolean;
itemsBeforeCollapse?: boolean;
maxItems?: number;
Expand Down
6 changes: 1 addition & 5 deletions packages/material-ui-lab/src/Breadcrumbs/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ class Breadcrumbs extends React.Component {
const allItems = React.Children.toArray(children);

return (
<Component
aria-label="Breadcrumb navigation"
className={classNames(classes.root, classNameProp)}
{...other}
>
<Component className={classNames(classes.root, classNameProp)} {...other}>
<ol className={classes.ol}>
{this.insertSeparators(
this.state.expanded || (maxItems && allItems.length <= maxItems)
Expand Down

0 comments on commit 50bed00

Please sign in to comment.