From 1e8bc6cb2b527cde3ae5444fd03c0ee33fca5e2f Mon Sep 17 00:00:00 2001 From: Elmar Ludwig Date: Tue, 24 Jan 2023 16:08:31 +0000 Subject: use aria-current="page" correctly, closes #1748 Closes #1748 Merge request studip/studip!1338 --- lib/navigation/Navigation.php | 8 +++++++- templates/header.php | 4 ++-- templates/index_nobody.php | 2 +- templates/tabs.php | 22 +--------------------- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/lib/navigation/Navigation.php b/lib/navigation/Navigation.php index 1492108..8c30714 100644 --- a/lib/navigation/Navigation.php +++ b/lib/navigation/Navigation.php @@ -399,7 +399,13 @@ class Navigation implements IteratorAggregate */ public function getLinkAttributes() { - return $this->link_attributes; + $attributes = $this->link_attributes; + + if ($this->isActive()) { + $attributes['aria-current'] = 'page'; + } + + return $attributes; } /** diff --git a/templates/header.php b/templates/header.php index 2bd7336..d49b8ef 100644 --- a/templates/header.php +++ b/templates/header.php @@ -210,7 +210,7 @@ if ($navigation) { -