reubenlillie/epellyson

Number content with JavaScript, not CSS

Opened this issue · 1 comments

  • Create JavaScript for numbering
    • Parts
    • Chapters
    • Articles
    • Paragraphs, and subparagraps
  • Convert CSS counters to fallback feature when JS is deactivated

CSS content: value; declarations are not a part of the DOM. They are only rendered visually. Counters cannot be selected with a cursor, and they are not detectable by screen readers. JavaScript should replace counters by injecting <span> and <a> with insertAdjacentHTML('afterbegin', counter) to number subheads and paragraph/subparagraph <section>

I’ve added some JS to replace the CSS counters. We still need to set up a fallback for when JS is deactivated. And we still need to account for the different numbering systems in the various parts of the 2017–2021 edition.