Skip to content

Commit

Permalink
Update work/headings-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
et0and authored Dec 13, 2024
1 parent b5f3cac commit 1a44e7a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions work/headings-checker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Headings checker
summary: A tool for detecting improper heading order in React
publishedAt: 2024-12-13
---
A simple tool that can be used to identify improper headings in your React project. It recursively scans and returns any violations where the order is skipped, whether this be with normal HTML heading tags (for example, h1/H1) or something like the [MUI Typography component](https://mui.com/material-ui/react-typography/).

Use `npx headings-checker` to run. It can be used as part of your CI/CD workflow via GitHub Actions to flag any issues as part of your development. 

More information about the importance of maintaining proper heading order can be read on the [W3C website](https://www.w3.org/WAI/tutorials/page-structure/headings/).

Inspired by the [react-accessible-headings package](https://github.com/springload/react-accessible-headings) developed by [Springload](https://www.springload.co.nz/).

0 comments on commit 1a44e7a

Please sign in to comment.