From a90ea78e67e0fcb1f7a341523dbe4dd9ee7dba98 Mon Sep 17 00:00:00 2001 From: Mahdi Khashan <58775404+mahdikhashan@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:22:08 +0200 Subject: [PATCH] comply with image-alt and region rules of a11y (#373) * add aria-label, aria-labelledby and alt to event-image * change div to nav to comply with landmark region rule * add pictureAltText event property * replace `PICTUREALTTEXT` with `PICTURE_ALT_TEXT` in eventService --- .../boudicca/publisher/event/html/service/EventService.kt | 1 + .../src/main/resources/templates/events/event.hbs | 2 +- .../src/main/resources/templates/layout/header_links.hbs | 4 ++-- .../src/main/kotlin/base/boudicca/SemanticKeys.kt | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/boudicca.base/publisher-event-html/src/main/kotlin/base/boudicca/publisher/event/html/service/EventService.kt b/boudicca.base/publisher-event-html/src/main/kotlin/base/boudicca/publisher/event/html/service/EventService.kt index f9a1c8de..9b9c1f1d 100644 --- a/boudicca.base/publisher-event-html/src/main/kotlin/base/boudicca/publisher/event/html/service/EventService.kt +++ b/boudicca.base/publisher-event-html/src/main/kotlin/base/boudicca/publisher/event/html/service/EventService.kt @@ -156,6 +156,7 @@ class EventService @Autowired constructor( pictureProxyService.submitPicture(event.data["pictureUrl"]!!).toString() else "", + "pictureAltText" to (event.data[SemanticKeys.PICTURE_ALT_TEXT] ?: ""), "accessibilityProperties" to getAllAccessibilityValues(event).joinToString(", "), ) } diff --git a/boudicca.base/publisher-event-html/src/main/resources/templates/events/event.hbs b/boudicca.base/publisher-event-html/src/main/resources/templates/events/event.hbs index e098ff3d..e483c515 100644 --- a/boudicca.base/publisher-event-html/src/main/resources/templates/events/event.hbs +++ b/boudicca.base/publisher-event-html/src/main/resources/templates/events/event.hbs @@ -1,7 +1,7 @@