feat: add 15 new WCAG rules, dynamic ARIA checks and bump version to v3.1.4

This commit is contained in:
Enes Yakıştır
2026-07-30 20:34:41 +03:00
parent 164828f9f7
commit 58b1618d96
31 changed files with 1138 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace YakNet\AccessibilityConsole\Tests\Rules;
use PHPUnit\Framework\TestCase;
use YakNet\AccessibilityConsole\Core\Scanner;
use YakNet\AccessibilityConsole\Rules\AppletBanned;
class AppletBannedTest extends TestCase
{
public function testFlagsAppletTag(): void
{
$scanner = new Scanner();
$scanner->addRule(new AppletBanned());
$violations = $scanner->scan('<div><applet code="MyApplet.class"></applet></div>');
$this->assertCount(1, $violations);
$this->assertSame('WCAG_4_1_2_APPLET_BANNED', $violations[0]->ruleId);
}
public function testPassesObjectTag(): void
{
$scanner = new Scanner();
$scanner->addRule(new AppletBanned());
$violations = $scanner->scan('<div><object data="movie.mp4">Fallback</object></div>');
$this->assertCount(0, $violations);
}
}