Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin committed May 3, 2024
1 parent 275399f commit 194b2cd
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions source/php/Component/Icon/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,9 @@ public function init()
$this->data['attributeList']['role'] = "img";
$this->data['attributeList']['data-nosnippet'] = "";
$this->data['attributeList']['translate'] = "no";

if ($decorative) {
$this->data['attributeList']['aria-hidden'] = "true";
} else {
$this->data['attributeList']['aria-label'] = $this->getAltText($icon);
$this->data['attributeList']['alt'] = $this->getAltText($icon);
}

$this->data['attributeList']['aria-label'] = $decorative ? "" : $this->getAltText($icon);
$this->data['attributeList']['alt'] = $decorative ? "" : $this->getAltText($icon);
$this->data['attributeList']['aria-hidden'] = $decorative ? "true" : "false";
}

private function iconIsSvg($icon)
Expand Down

0 comments on commit 194b2cd

Please sign in to comment.