or element must not have aria-hidden="true".'; } public function getStandard(): WCAGStandard { return WCAGStandard::A; } public function getSeverity(): Severity { return Severity::ERROR; } public function getLevel(): int { return 1; } public function check(DOMElement $element): ?Violation { $tagName = strtolower($element->tagName); if ($tagName !== 'body' && $tagName !== 'html') { return null; } if (strtolower($element->getAttribute('aria-hidden')) === 'true') { return $this->createViolation( $element, $this->getDescription(), 'Remove aria-hidden="true" from the / tag to prevent hiding the entire document from screen readers.' ); } return null; } }