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

Typography: Include semantic elements in code examples #927

Closed
GCHQ-Developer-299 opened this issue Apr 30, 2024 · 1 comment
Closed

Typography: Include semantic elements in code examples #927

GCHQ-Developer-299 opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@GCHQ-Developer-299
Copy link
Contributor

What component is this related to?

Typography

Why do we need it?

The typography guidance page says:

Add a variant to the typography element to change its style. This doesn't change the semantic level of the typography element so make sure to always adhere to accessible heading levels. For example, body text with a variant of h2 will appear visually as an h2 but still be body text in the DOM.

To support this best practice, we should update the Code examples to include semantic tags, like below:

<ic-typography variant="h1"><h1>H1</h1></ic-typography>
<ic-typography variant="h2"><h2>H2</h2></ic-typography>
<ic-typography variant="h3"><h3>H3</h3></ic-typography>
<ic-typography variant="h4"><h4>H4</h4></ic-typography>
...

This is important, otherwise developers might end up using Typography to make headings that only visibly appear as headings.

@gd2910
Copy link
Contributor

gd2910 commented May 28, 2024

Completed as part of #751

@gd2910 gd2910 moved this from In Review to Done in Intelligence Community Design System May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants