Skip to content

minor: Fix heading levels on docs homepage#1448

Merged
delucis merged 1 commit into
mainfrom
chris/a11y
Aug 31, 2022
Merged

minor: Fix heading levels on docs homepage#1448
delucis merged 1 commit into
mainfrom
chris/a11y

Conversation

@delucis
Copy link
Copy Markdown
Member

@delucis delucis commented Aug 31, 2022

What kind of changes does this PR include?

  • Minor content fixes (broken links, typos, etc.)

Description

a11y guidelines state that heading levels should increment by one level at a time (e.g. <h4> must be preceded by an <h3>) We were using <h4> for the first two headings on the docs homepage, which violates that rule. I suspect this was to keep these headings out of the sidebar or for stylistic reasons (smaller font size).

I’ve switched back to <h2> to fix this a11y issue (it impacts Lighthouse scores amongst other things), and used a literal <h2> tag for the first mini section to avoid that showing up in the table of contents.

a11y guidelines state that heading levels should increment by one level at a time (e.g. `<h4>` must be preceded by an `<h3>`) We were using `<h4>` for the first two headings on the docs homepage, which violates that rule. I suspect this was to keep these headings out of the sidebar or for stylistic reasons (smaller font size).

I’ve switched back to `<h2>` to fix this a11y issue (it impacts Lighthouse scores amongst other things), and used a literal `<h2>` tag for the first mini section to avoid that showing up in the table of contents.
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 31, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 9e11369
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/630feae5f534570008f2d2a8
😎 Deploy Preview https://deploy-preview-1448--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sarah11918
Copy link
Copy Markdown
Member

LGTM! 💜

@delucis delucis merged commit 93623a1 into main Aug 31, 2022
@delucis delucis deleted the chris/a11y branch August 31, 2022 23:16
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.

2 participants