diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2024-04-23 08:46:46 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2024-04-23 11:29:56 +0200 |
| commit | e27a634a6b47d02c733e28e19faa5a0f6c928027 (patch) | |
| tree | e1ee09428c3ff6016b7084d95d59c15fe280aec1 | |
| parent | 764289a3737a8c3b1a5fc3d9c6024c3896f4fec0 (diff) | |
Resolve "Barrierefreiheit: Blubber Benachrichtigungsstatus ist nicht für Screenreader erkennbar"
Closes #4061
Merge request studip/studip!2907
| -rw-r--r-- | resources/assets/javascripts/lib/blubber.js | 1 | ||||
| -rw-r--r-- | templates/blubber/global_context.php | 2 |
2 files changed, 3 insertions, 0 deletions
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<?= $unfollowed ? " unfollowed" : "" ?>" title="<?= _("Benachrichtigungen für diese Konversation abstellen.") ?>" + aria-pressed="<?= $unfollowed ? 'false' : 'true' ?>" + role="button" data-thread_id="global"> <?= Icon::create("notification2+remove")->asImg(20, ['class' => "follow text-bottom"]) ?> <?= Icon::create("notification2")->asImg(20, ['class' => "unfollow text-bottom"]) ?> |
