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

Nested main element in faq #3264

Closed
MikeMcC399 opened this issue Nov 30, 2022 · 1 comment · Fixed by #3265
Closed

Nested main element in faq #3264

MikeMcC399 opened this issue Nov 30, 2022 · 1 comment · Fixed by #3265
Labels
bug Something isn't working

Comments

@MikeMcC399
Copy link
Contributor

Where to find the issue

Describe the issue

The FAQ page https://www.coronawarn.app/en/faq/ contains two <main> elements. This is not allowed:

    <main id="main" class="main-content" role="main" tabindex="-1">
        <main class="main text-center">

Steps to reproduce

Run https://validator.w3.org/ on https://www.coronawarn.app/en/faq/ and note the error messages:

  • "The main element must not appear as a descendant of the main element."
  • "A document must not include more than one visible main element"

also

  • "Stray end tag div."

Analysis

The first main definition comes from:

<main id="main" class="main-content" role="main" tabindex="-1">

  • The class="main-content" attribute statement does not seem to be used.
  • According to https://w3c.github.io/html-aria/#el-main it is not recommended to explicitly assign role="main" since it is already implicitly assigned.

The second main definition comes from:

<main class="main text-center">

  • The main class is not defined. It may not be needed.
  • The text-center class is from bootstrap.

Suggestion

Convert the <main> tag in src/partials/page-faq.html to a <div> tag and combine this with the stray </div> end tag.

Review the attribute settings class="main-content" role="main" in src/layouts/default.html in a separate issue.

References

@MikeMcC399 MikeMcC399 added the bug Something isn't working label Nov 30, 2022
@MikeMcC399
Copy link
Contributor Author

@brianebeling brianebeling linked a pull request Dec 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant