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

Admonitions make the Heading hierarchy inconsistent #7344

Closed
1 of 2 tasks
peirstom opened this issue May 5, 2022 · 1 comment · Fixed by #7152
Closed
1 of 2 tasks

Admonitions make the Heading hierarchy inconsistent #7344

peirstom opened this issue May 5, 2022 · 1 comment · Fixed by #7152
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@peirstom
Copy link

peirstom commented May 5, 2022

Have you read the Contributing Guidelines on issues?

Motivation

A accessibility review was done by one of our customers and found the following:

The content of a page is structured by headings, among other things. To make this accessible to blind users, for example, HTML heading elements and their correct level hierarchy are an important prerequisite.

In a content document, the headings "Note" are always marked with level 5, although they partly follow headings of levels 1, 2 and 3. I would propose to not even use a Heading element for admonitions.

      <div className="admonition-heading">
        <h5>
          <span className="admonition-icon">{icon}</span>
          {title}
        </h5>
      </div>
      <div className="admonition-content">{children}</div>
    </div>

image

Self-service

  • I'd be willing to do some initial work on this proposal myself.
@peirstom peirstom added proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels May 5, 2022
@Josh-Cena Josh-Cena added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels May 5, 2022
@Josh-Cena
Copy link
Collaborator

We're aware of this. Our own lighthouse report doesn't reach 100 a11y because of this. (e.g. #7334 (comment))

However, this admonition is created by an external plugin, which is pretty much dead now. (elviswolcott/remark-admonitions#26)

If we are to fix it, we will need to fork the dependency. Tracked in #6246. However, we have some complications around setting up our fork storage organization (@Docusaurus).

Would you be okay if I close this, since it's basically unactionable on our side, and we are fully aware of this problem for over a year now?

@Josh-Cena Josh-Cena changed the title Admonitions make the Heading hierarchy inconsisten Admonitions make the Heading hierarchy inconsistent May 6, 2022
@Josh-Cena Josh-Cena added bug An error in the Docusaurus core causing instability or issues with its execution and removed proposal This issue is a proposal, usually non-trivial change labels May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants