From e27a634a6b47d02c733e28e19faa5a0f6c928027 Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse Date: Tue, 23 Apr 2024 08:46:46 +0000 Subject: =?UTF-8?q?Resolve=20"Barrierefreiheit:=20Blubber=20Benachrichtigu?= =?UTF-8?q?ngsstatus=20ist=20nicht=20f=C3=BCr=20Screenreader=20erkennbar"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4061 Merge request studip/studip!2907 --- resources/assets/javascripts/lib/blubber.js | 1 + templates/blubber/global_context.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/resources/assets/javascripts/lib/blubber.js b/resources/assets/javascripts/lib/blubber.js index 6a72382..59ef15f 100644 --- a/resources/assets/javascripts/lib/blubber.js +++ b/resources/assets/javascripts/lib/blubber.js @@ -173,6 +173,7 @@ const Blubber = { : STUDIP.api.DELETE(`blubber/threads/${thread_id}/follow`); return promise.then(() => { + elements.attr('aria-pressed', follow ? 'true' : 'false'); elements.toggleClass('unfollowed', !follow); return follow; }).always(() => { diff --git a/templates/blubber/global_context.php b/templates/blubber/global_context.php index 1a5c242..6f67d50 100644 --- a/templates/blubber/global_context.php +++ b/templates/blubber/global_context.php @@ -7,6 +7,8 @@ onClick="STUDIP.Blubber.followunfollow('global'); return false;" class="followunfollow" title="" + aria-pressed="" + role="button" data-thread_id="global"> asImg(20, ['class' => "follow text-bottom"]) ?> asImg(20, ['class' => "unfollow text-bottom"]) ?> -- cgit v1.0