Skip to content

Notes and issues should not generate headings by default, to avoid encumbering document navigation #5092

@kfranqueiro

Description

@kfranqueiro

Currently, ReSpec adds role="heading" and aria-level to every note, editor's note, and issue title. When attempting to navigate by heading structure, this causes a great deal of noise and makes it harder to navigate between the actually meaningful headings in a document.

The noise is especially meaningless when notes or issues are untitled, which seems to apply to the vast majority of cases for notes. Even in the case of titled notes and issues, there is still argument to be made that these do not commonly warrant a place in the document's heading structure, as notes are often parenthetical or ancillary, and issues often consist of a single sentence with a link out for further information.

This issue can also become particularly egregious in the case of e.g. a glossary, where there tends to be no sub-headings, so the heading structure purely becomes a stream of "Note", "Note", "Note 1", "Note 2", "Note", etc. until the next h2 is reached.

Describe the solution you'd like

Do not add these attributes by default.

If some authors find the addition of headings helpful for certain documents, it could potentially be kept as an option, or perhaps we document how to accomplish it with postProcess instead of actively maintaining it (especially given multiple other existing issues around it, e.g. #1752, #4274, and #4789).

Additional context

This initially came to the WAI Team's attention via w3c/wcag#4725 (comment). This issue is raised as an action item from my discussion with @iadawn and @daniel-montalvo.

On the topic of untitled vs. titled, I surveyed all respec-generated documents listed in w3c/webref's ed/index.json:

  • 94% of all notes found are untitled
  • 97.5% of documents that contain notes have at least one untitled note
  • Issues are titled far more frequently, roughly 80% of the time overall

Describe any alternatives you've considered

This could be worked around in postProcess, but that would need to be done on a per-document basis, whereas this causes a usability issue that impacts all documents by default.

Can you or your organization fund the work or help with development?

I would be willing to work on a PR myself if there is agreement on doing so.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions