feat: Release v3.0.0 - PHPStan-style analysis, configuration, baseline, and advanced WCAG rules

This commit is contained in:
Enes Yakıştır
2026-06-23 01:02:15 +03:00
parent 84c6521195
commit d5165f0be4
29 changed files with 2192 additions and 167 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace YakNet\AccessibilityConsole\Rules;
use DOMElement;
use YakNet\AccessibilityConsole\Core\Severity;
use YakNet\AccessibilityConsole\Core\Violation;
use YakNet\AccessibilityConsole\Core\WCAGStandard;
class FontTagBanned extends AbstractRule
{
public function getId(): string { return 'WCAG_FONT_TAG_BANNED'; }
public function getDescription(): string { return 'The font tag is obsolete and should not be used. Use CSS for styling instead.'; }
public function getStandard(): WCAGStandard { return WCAGStandard::A; }
public function getSeverity(): Severity { return Severity::WARNING; }
public function getLevel(): int { return 2; }
public function check(DOMElement $element): ?Violation
{
if (strtolower($element->tagName) === 'font') {
return $this->createViolation(
$element,
$this->getDescription(),
'Remove the <font> tag and style the text using CSS instead.'
);
}
return null;
}
}