addRule(new EmptyHeading()); $violations = $scanner->scan('

'); $this->assertCount(1, $violations); $this->assertSame('WCAG_1_3_1_EMPTY_HEADING', $violations[0]->ruleId); } public function testFlagsEmptyAriaLabel(): void { $scanner = new Scanner(); $scanner->addRule(new EmptyHeading()); $violations = $scanner->scan('

'); $this->assertCount(1, $violations); } public function testPassesHeadingWithImageAlt(): void { $scanner = new Scanner(); $scanner->addRule(new EmptyHeading()); $violations = $scanner->scan('

Company Name

'); $this->assertCount(0, $violations); } public function testPassesHeadingWithSvgTitle(): void { $scanner = new Scanner(); $scanner->addRule(new EmptyHeading()); $violations = $scanner->scan('

Dashboard

'); $this->assertCount(0, $violations); } public function testPassesHeadingWithAriaLabel(): void { $scanner = new Scanner(); $scanner->addRule(new EmptyHeading()); $violations = $scanner->scan('

'); $this->assertCount(0, $violations); } }