Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 681698b

Browse files
authored
Merge pull request #19 from 8fold/8fold-sites
Verify div can accept aria-hidden
2 parents 2385727 + 0dfd35c commit 681698b

File tree

3 files changed

+110
-21
lines changed

3 files changed

+110
-21
lines changed

composer.lock

Lines changed: 102 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static public function fold($element, ...$content)
3030
public function __construct($element, ...$content)
3131
{
3232
$this->element = Type::sanitizeType($element, ESString::class)
33-
->replace("_", "-");
33+
->replace(["_" => "-"]);
3434
$this->content = Type::sanitizeType($content, ESArray::class);
3535
}
3636

tests/html/HtmlTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,11 @@ public function testFormIsCanHavAttributes()
8686
->unfold();
8787
$this->assertEquals($expected, $result);
8888
}
89+
90+
public function testCanHaveAriaHidden()
91+
{
92+
$expected = '<div aria-hidden="true"></div>';
93+
$actual = Html::div()->attr("aria-hidden true");
94+
$this->assertSame($expected, $actual->unfold());
95+
}
8996
}

0 commit comments

Comments
 (0)