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

Should an aside in main fail axe? #2651

Closed
WilcoFiers opened this issue Nov 19, 2020 · 4 comments
Closed

Should an aside in main fail axe? #2651

WilcoFiers opened this issue Nov 19, 2020 · 4 comments
Assignees
Labels
info needed More information or research is needed to continue
Milestone

Comments

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Nov 19, 2020

We keep getting feedback about failing this scenario:

<main>
  <p>Lorem's ipsum</p>
  <aside>Some stuff</aside>
</main>

Axe-core goes by the ARIA standards on this, but lets do some actual testing to figure out if this creates problems.

@WilcoFiers WilcoFiers added the info needed More information or research is needed to continue label Nov 19, 2020
@WilcoFiers WilcoFiers added this to the axe-core 4.2 milestone Nov 19, 2020
@WilcoFiers
Copy link
Contributor Author

Did a little testing. Here's my code:

  <main>
    <header>Header</header>
    <footer>Footer</footer>
    <aside>Aside</aside>
  </main>
  • Chrome sees main and complementary
  • Safari sees main, banner and complementary
  • Firefox sees main and complementary

Not sure why Safari also treats considers the heading to be a landmark. If I put the footer outside the main it does pick it up. That seems like a bug in Safari.

@scottaohara
Copy link
Contributor

would agree that safari is incorrect here.

@WilcoFiers
Copy link
Contributor Author

I'm leaning towards creating an exception for aside in this rule. The landmark-unique rule will still call it out if someone uses multiple aside elements in the page, except if they give it a unique name, which I think also addresses the concern here.

@padmavemulapati
Copy link

Verified with the latest axe-core develop branch code base(dated 12th jan 2021):
rule:landmark-complementary-is-top-level verified with the pass and fail criteria validated to allow aside inside main
Test snippet for fail:
<nav><div role="complementary" id="target"></div></nav>

This complementary landmark is in a main landmark

`

image

Test snippet for pass:
<div role="main">
<div role="complementary">
<p>This div has role complementary></p>
</div>
</div>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed More information or research is needed to continue
Projects
None yet
Development

No branches or pull requests

4 participants