Skip to content

Commit

Permalink
Tweak <aside> conditional mappings to check for more cases (web-platf…
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakusayan authored and mbrodesser-Igalia committed Feb 19, 2024
1 parent 76600b2 commit ed30d1d
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions html-aam/roles-contextual.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,35 @@
<a data-testname="el-a-no-href" class="ex-generic">x</a>

<!-- el-aside -->
<aside data-testname="el-aside" data-expectedrole="complementary" class="ex">x</aside>
<main>
<aside data-testname="el-aside-in-main" data-expectedrole="complementary" class="ex">x</aside>
<article>
<aside data-testname="el-aside-in-article-in-main" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-article-in-main-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
</article>
</main>
<article>
<aside data-testname="el-aside-in-article" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-article-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
</article>
<aside>
<aside data-testname="el-aside-in-aside" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-aside-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
</aside>
<nav>
<aside data-testname="el-aside-in-section-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
<aside data-testname="el-aside-in-section-without-name" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-section-with-role" data-expectedrole="complementary" class="ex" role="complementary">x</aside>
<aside data-testname="el-aside-in-nav" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-nav-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
<aside data-testname="el-aside-in-nav-with-role" data-expectedrole="complementary" class="ex" role="complementary">x</aside>
</nav>
<aside data-testname="el-aside-ancestorbodymain" data-expectedrole="complementary" class="ex">x</aside>
<!-- Spec says that the conditional aside mapping happens when nested in a sectioning content element.
However, this doesn't make sense if the parent <section> isn't a landmark in the first place.
Let's force the section to always be a landmark for now, but we should probably expand on this test
case pending discussions in https://github.com/w3c/html-aam/pull/484 -->
<section aria-label="x">
<aside data-testname="el-aside-in-section" class="ex-generic">x</aside>
<aside data-testname="el-aside-in-section-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside>
</section>

<!-- el-footer -->
<nav>
Expand Down Expand Up @@ -55,4 +78,4 @@
</script>

</body>
</html>
</html>

0 comments on commit ed30d1d

Please sign in to comment.