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

Use h2 if there's no contents list #1482

Merged
merged 1 commit into from
Sep 13, 2019
Merged

Conversation

vanitabarrett
Copy link
Contributor

@vanitabarrett vanitabarrett commented Sep 12, 2019

When the contents list component doesn't display (if there's 2 groups or less), then the heading level skips from H1 (page title) to H3 (group headings).

Someone raised this issue in a Zendesk ticket: https://govuk.zendesk.com/agent/tickets/3800830

This commit checks whether a contents list will be displayed, and uses a H2 if not.

  • Page with contents list: /government/collections/statistics-performance-tables
  • Page without contents list: /government/collections/statistics-exclusions

When the contents list component doesn't display (if there's 2 groups or less), then the heading level skips from H1 (page title) to H3 (group headings).

Someone raised this issue in a Zendesk ticket: https://govuk.zendesk.com/agent/tickets/3800830

This commit checks whether a contents list will be displayed, and uses a H2 if not.
Copy link
Contributor

@chao-xian chao-xian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@vanitabarrett vanitabarrett merged commit 9da99a7 into master Sep 13, 2019
@vanitabarrett vanitabarrett deleted the use-h2-no-contents branch September 13, 2019 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants