From 9c51abb9e3b10277a3828626ee3b5c1481cf42ca Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+github@gmail.com> Date: Thu, 12 May 2022 09:11:22 +0200 Subject: [PATCH] add aria role 'button' to toggle and make the description more verbose, re #973 --- app/views/admission/ruleadministration/index.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/admission/ruleadministration/index.php b/app/views/admission/ruleadministration/index.php index 6f63adb36be..ca829a8ee73 100644 --- a/app/views/admission/ruleadministration/index.php +++ b/app/views/admission/ruleadministration/index.php @@ -11,14 +11,20 @@ <? foreach ($ruleTypes as $type => $details): ?> <tr id="ruletype_<?= htmlReady($type) ?>"> <td> - <a href="<?= $controller->toggle_activation($type) ?>"> + <a href="<?= $controller->toggle_activation($type) ?>" role="button"> <? if ($details['active']): ?> <?= Icon::create('checkbox-checked')->asImg([ - 'title' => _('Diese Regel ist aktiv. Klicken Sie hier, um sie zu deaktivieren.') + 'title' => sprintf( + _('Die Regel "%s" ist aktiv. Klicken Sie hier, um sie zu deaktivieren.'), + $details['name'] + ) ]) ?> <? else: ?> <?= Icon::create('checkbox-unchecked')->asImg([ - 'title' => _('Diese Regel ist inaktiv. Klicken Sie hier, um sie zu aktivieren.') + 'title' => sprintf( + _('Die Regel "%s" ist inaktiv. Klicken Sie hier, um sie zu aktivieren.'), + $details['name'] + ) ]) ?> <? endif; ?> </a> -- GitLab