Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mgrsskls/heading-structure-snippet
Highlight headline elements which do not follow a logical structure
https://github.com/mgrsskls/heading-structure-snippet
a11y accessibility bookmarklet html
Last synced: about 2 months ago
JSON representation
Highlight headline elements which do not follow a logical structure
- Host: GitHub
- URL: https://github.com/mgrsskls/heading-structure-snippet
- Owner: mgrsskls
- Created: 2021-10-22T18:39:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-04T13:57:16.000Z (about 3 years ago)
- Last Synced: 2024-10-13T20:08:10.177Z (3 months ago)
- Topics: a11y, accessibility, bookmarklet, html
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heading structure snippet
This snippet can be used to highlight heading elements that do not follow a logical structure.
I.e.:
- The first heading on a page is not an `h1` or an element is an `h1` but not the first heading.
- If an adjacent heading is smaller than the previous heading but skips a level (e.g. an `h4` follows `h2`)Please note that this snippet only checks the logical structure, but not whether the heading structure makes sense in terms of content.
## How to use as a bookmarklet
Minify the code from [index.js](https://github.com/mgrsskls/headline-structure-snippet/blob/main/index.js) (e.g. to https://minify-js.com/) and create a bookmark in your browser with the following url: `javascript:...` (replace `...` with the minified code)