tagName) !== 'a') { return null; } if ($element->hasAttribute('href')) { $href = trim($element->getAttribute('href')); // Check for javascript: links or '#' (which represents a placeholder/scripting target) if (str_starts_with(strtolower($href), 'javascript:') || $href === '#') { return $this->createViolation( $element, $this->getDescription(), 'Convert the link to a