@@ -22,6 +22,9 @@ ruleTester.run('template-no-duplicate-landmark-elements', rule, {
2222 '<template><nav></nav><dialog><nav></nav></dialog></template>' ,
2323 // Dynamic role values — can't determine role statically
2424 '<template><div role={{this.role}}></div><div role={{this.role}}></div></template>' ,
25+ // Dynamic aria-label on one landmark — can't infer whether it duplicates a sibling
26+ '<template><form></form><form aria-label={{this.formLabel}}></form></template>' ,
27+ '<template><nav></nav><nav aria-label={{this.navLabel}}></nav></template>' ,
2528 ] ,
2629
2730 invalid : [
@@ -80,6 +83,9 @@ hbsRuleTester.run('template-no-duplicate-landmark-elements (hbs)', rule, {
8083 // Dynamic aria-label values are treated as unique (can't statically determine duplicates)
8184 '<nav aria-label={{siteNavigation}}></nav><nav aria-label={{siteNavigation}}></nav>' ,
8285 '<nav aria-label="primary navigation"></nav><nav aria-label={{this.something}}></nav>' ,
86+ // Dynamic aria-label on one landmark sibling of an unlabeled landmark — can't infer duplication
87+ '<form></form><form aria-label={{this.formLabel}}></form>' ,
88+ '<nav></nav><nav aria-label={{this.navLabel}}></nav>' ,
8389 // header/footer inside sectioning elements lose their landmark role
8490 "<main><header><h1>Main Page Header</h1></header><button commandfor='my-dialog'>Open Dialog</button></main><dialog id='my-dialog'><header><h1>Dialog Header</h1></header></dialog>" ,
8591 "<main><header><h1>Main Page Header</h1></header><button commandfor='my-dialog'>Open Dialog</button></main><div popover id='my-dialog'><header><h1>Dialog Header</h1></header></div>" ,
0 commit comments