From 8f846c4401b86303b9278ee260fc66a1e4302272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 14 May 2025 16:08:11 +0200 Subject: [PATCH] feat: various a11y fixes --- .../Classes/ViewHelpers/IconViewHelper.php | 1 + .../ViewHelpers/LazyLoadImageViewHelper.php | 2 ++ .../Private/Assets/images/icons_sprite.svg | 2 +- .../Private/Layouts/Page/Detail.html | 20 ++++++++----- .../Private/Layouts/Page/Frontpage.html | 18 +++++++----- .../Private/Layouts/Page/FrontpageEvent.html | 8 +++-- .../Private/Partials/Concept/Teaser.html | 12 ++++---- .../Partials/Disturber/LastChance.html | 2 +- .../Private/Partials/HeaderSlider.html | 9 ++++-- .../Resources/Private/Partials/Mainnav.html | 29 ++++++++++--------- .../Resources/Private/Partials/Mobilenav.html | 2 +- .../Partials/News/Detail/MediaContainer.html | 2 +- .../Private/Partials/News/List/Item.html | 10 +++---- .../Private/Partials/Pricetable.html | 3 +- .../Partials/Product/HeaderDetail.html | 1 - .../Private/Partials/Product/Teaser.html | 3 +- .../Private/Partials/Region/Webcam.html | 3 +- .../Private/Partials/Search/MobileSearch.html | 2 +- .../Private/Partials/Textmedia/LinkPanel.html | 5 ---- .../Resources/Private/Partials/Topnav.html | 4 +-- .../Templates/AjaxTable/DaytripRooms.html | 3 +- .../Templates/AjaxTable/Pricetable.html | 3 +- 22 files changed, 76 insertions(+), 68 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php index 8e2a8826..0bcb8ae5 100644 --- a/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php +++ b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/IconViewHelper.php @@ -29,6 +29,7 @@ class IconViewHelper extends AbstractTagBasedViewHelper $content = sprintf('', $imageUrl, $this->arguments['icon']); $this->tag->setContent($content); + $this->tag->addAttributes(['aria-hidden' => 'true']); return $this->tag->render(); } diff --git a/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/LazyLoadImageViewHelper.php b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/LazyLoadImageViewHelper.php index b769a935..35cadc37 100644 --- a/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/LazyLoadImageViewHelper.php +++ b/public/typo3conf/ext/ep_theme/Classes/ViewHelpers/LazyLoadImageViewHelper.php @@ -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(); } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/images/icons_sprite.svg b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/images/icons_sprite.svg index 2c26f670..3547da80 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/images/icons_sprite.svg +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/images/icons_sprite.svg @@ -1,4 +1,4 @@ - +
@@ -33,17 +33,19 @@ -
-
+
+ {concept.name} -
+ +
{concept.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
- +
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/LastChance.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/LastChance.html index df0da2ff..d3b4cb3c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/LastChance.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disturber/LastChance.html @@ -8,7 +8,7 @@
{data.bodytext -> f:format.html()}
{data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')} - {button.container.label -> f:format.raw()} + {button.container.label -> f:format.raw()}
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSlider.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSlider.html index b82282d8..7ff48d72 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSlider.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/HeaderSlider.html @@ -16,7 +16,7 @@ - + {image.alternative} @@ -34,6 +34,7 @@ {slide.button} @@ -44,7 +45,8 @@
- +
Ski-
Pass
inklusive
@@ -53,7 +55,8 @@ - +
+ alt="Bildmarke"/> diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/MobileSearch.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/MobileSearch.html index 29a0a0f8..193b9fa1 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/MobileSearch.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Search/MobileSearch.html @@ -11,7 +11,7 @@ - +