Skip to content
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

chore(icons): remove outdated developing with carbon section #1317

Merged
merged 2 commits into from
Jul 13, 2020
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
51 changes: 0 additions & 51 deletions src/pages/guidelines/icons/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,54 +132,3 @@ When used next to text, icons should be center-aligned.

</DoDont>
</DoDontRow>

## Developing with icons

### SVG Icons

#### Requirements:

Install `carbon-icons`.

Full installation details can be found in the Carbon icons [GitHub repo](https://github.com/carbon-design-system/carbon-icons).

### Main files

`carbon-icons` ships with two main SVG files:

| Filename | Description | Supported versions |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------ |
| _carbon-icons.svg_ | Contains current icons (consolidated subset of legacy icons used in IBM Bluemix) | `3.x` & newer |
| _carbon-icons.json_ | JSON file created from carbon-icons.svg, used in [Carbon](/guidelines/iconography/library) | `3.x` & newer |
| _carbon-icons.js_ | JS module created from carbon-icons.svg, used in `Icon` React Component in [carbon-components-react](#) | `3.x` & newer |
| _icons.json_ | legacy JSON file created from sprite.svg | `1.x`,`2.x`&`3.x` |
| _legacy-icons.js_ | JS module created from sprite.svg | `3.x` only |

### Accessibility

For screen reader accessibility, provide a context-rich title for the SVG using `<title>` element.

```html
<svg>
<title>Add a new service</title>
<use xlink:href="/carbon-icons/dist/icon--add--glyph"></use>
</svg>
```

If support for older browsers is needed, use the `aria-labelledby` attribute to reference the `<title>` element using an `id`.

The `<title>` element will be read by the screen reader to the user, so it should describe its purpose.

Make sure that you do not duplicate this `id`.

```html
<svg aria-labelledby="add">
<title id="add">Add a new service</title>
<use xlink:href="/carbon-icons/dist/icon--add"></use>
</svg>
```

<Title> For more details on accessibility, see the following resources: </Title>

- "Accessible SVGs" via [CSS-Tricks](https://css-tricks.com/accessible-svgs/)
- "5.4 The 'desc' and 'title' elements" via [W3C.org](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)