Skip to content

Commit

Permalink
Add ariaControls(), ariaExpanded() in AbstractA::class widget. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Nov 8, 2023
1 parent 4a375eb commit 95ba79b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Base/AbstractA.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
*/
abstract class AbstractA extends AbstractElement
{
use Attribute\Aria\HasAriaControls;
use Attribute\Aria\HasAriaDisabled;
use Attribute\Aria\HasAriaExpanded;
use Attribute\Aria\HasAriaLabel;
use Attribute\Aria\HasRole;
use Attribute\CanBeAutofocus;
Expand Down
10 changes: 10 additions & 0 deletions tests/A/RenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public function testAriaDisabled(): void
$this->assertSame('<a aria-disabled="true"></a>', A::widget()->ariaDisabled('true')->render());
}

public function testAriaControls(): void
{
$this->assertSame('<a aria-controls="test-aria-controls"></a>', A::widget()->ariaControls('test-aria-controls')->render());
}

public function testAriaExpanded(): void
{
$this->assertSame('<a aria-expanded="true"></a>', A::widget()->ariaExpanded('true')->render());
}

public function testAriaLabel(): void
{
$this->assertSame('<a aria-label="test-aria-label"></a>', A::widget()->ariaLabel('test-aria-label')->render());
Expand Down

0 comments on commit 95ba79b

Please sign in to comment.