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

Make use of HTML sectioning elements #22

Open
EsseLowNitro opened this issue Jan 23, 2025 · 0 comments
Open

Make use of HTML sectioning elements #22

EsseLowNitro opened this issue Jan 23, 2025 · 0 comments
Assignees

Comments

@EsseLowNitro
Copy link
Collaborator

The website is structured in a hard-coded way with some HTML semantic tags: the <header> contains a <nav>, all rendered markdown content is wrapped inside a <main> section, and a <footer> closes the page body, all parts in correct tags for their purposes. But inside the <main> part, the rendered markdown is, basically, a simple conversion of symbols (eg. # [text] wraps [text] in a level 1 heading), with the renderer not aware of the context of these symbols, which could be considered to make use of HTML sectioning elements, too, when appropriate.

For a few examples, a level 2 heading and its pertaining paragraphs (and any other elements) could be wrapped in an <article> element. A level 2 heading with lower level headings could be wrapped in a <section> element, with the lower level headings inside an <article>. A table of contents could be in a <nav>.

The examples above reflect what the GrapheneOS website uses in the FAQ page:
Image

Other pages use different nesting schemes of article and section elements, and I couldn't really distinguish why.

This can be automated if a solid recommendation can be followed, but should require using (finding or creating) Jekyll plugins to modify the way markdown pages are rendered. Tho, creating plugins for tasks like these is easy and shouldn't require much maintenance.

@EsseLowNitro EsseLowNitro self-assigned this Jan 30, 2025
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

No branches or pull requests

1 participant