addRule(new AriaLabelMisuseOnGeneric()); $html = '
Content
'; $violations = $scanner->scan($html); $this->assertCount(1, $violations); $this->assertSame('WCAG_4_1_2_ARIA_LABEL_GENERIC', $violations[0]->ruleId); } public function testPassesDivWithRoleAndAriaLabel(): void { $scanner = new Scanner(); $scanner->addRule(new AriaLabelMisuseOnGeneric()); $html = '
Content
'; $violations = $scanner->scan($html); $this->assertCount(0, $violations); } }