Skip to content

Commit

Permalink
fixing aria roles, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bitstarr committed Dec 1, 2020
1 parent 2d19f65 commit 0623238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'SVG Extension'
version: 1.0.1
version: 1.0.2
description: 'Inline SVG in Twig Templates'
icon: picture-o
author:
Expand Down
4 changes: 2 additions & 2 deletions svg-extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ protected function createHtml(string $svgString, ?string $classes): string
$titleTag = $svgDomDoc->createElement('title', $this->options['title']);
$titleTag->setAttribute('id', $attId);
$svgNodeInDocument->appendChild($titleTag);
$svgNodeInDocument->setAttribute('role', 'image');
$svgNodeInDocument->setAttribute('role', 'img');
$svgNodeInDocument->setAttribute('aria-labelledby', $attId);
}
else {
$svgNodeInDocument->setAttribute('role', 'presentation');
$svgNodeInDocument->setAttribute('role', 'img');
$svgNodeInDocument->setAttribute('aria-hidden', 'true');
}

Expand Down

0 comments on commit 0623238

Please sign in to comment.