Skip to content

Commit

Permalink
fix: Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alanbsmith committed May 12, 2020
1 parent ecd3526 commit 2cd6886
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions modules/badge/css/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ accessibility concerns you'll want to keep in mind:
</div>
```

> Note: To use the `wdc-accessible-hide` class, you'll need to import it from the core module.
```scss
@import '~@workday/canvas-kit-css-core/lib/accessibility.scss';
```

## Usage

### Variants
Expand Down
15 changes: 13 additions & 2 deletions modules/badge/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ accessibility concerns you'll want to keep in mind:

### Example

```jsx
```tsx
import styled from '@emotion/styled';
import { accessibleHide } from "@workday/canvas-kit-react";

...

const AccessibleHide = styled('div')({
...accessibleHide,
});

...

<IconButton
style={{ position: "relative" }}
aria-label={`Alerts ${count} new notifications`}
Expand All @@ -36,7 +47,7 @@ accessibility concerns you'll want to keep in mind:
<SystemIcon icon={notificationsIcon} aria-hidden="true" />
<Badge count={count} aria-hidden="true" />
</IconButton>
<div className="wdc-accessible-hide" role="status" aria-live="polite" aria-atomic="true">
<AccessibleHide role="status" aria-live="polite" aria-atomic="true">
New notifications
</div>
```
Expand Down

0 comments on commit 2cd6886

Please sign in to comment.