feat: various a11y fixes
This commit is contained in:
@@ -29,6 +29,7 @@ class IconViewHelper extends AbstractTagBasedViewHelper
|
||||
|
||||
$content = sprintf('<use href="%s#icon-%s"></use>', $imageUrl, $this->arguments['icon']);
|
||||
$this->tag->setContent($content);
|
||||
$this->tag->addAttributes(['aria-hidden' => 'true']);
|
||||
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ class LazyLoadImageViewHelper extends ImageViewHelper
|
||||
$classItems[] = 'lazyload';
|
||||
$classes = implode(' ', array_unique($classItems));
|
||||
$this->tag->addAttribute('class', $classes);
|
||||
// ensure a11y compliance
|
||||
$this->tag->removeAttribute('title');
|
||||
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user