Skip to content

Commit 7032b0e

Browse files
lukas-heinrichthibsy
authored andcommitted
[FIX] #43964 UI: mark Listing\Workflow current step for assistive technologies. (ILIAS-eLearning#11145)
* Fixes https://mantis.ilias.de/view.php?id=43964 * Add `aria-current="step"` to the list element, which carries the step semantically.
1 parent ae4b834 commit 7032b0e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

components/ILIAS/UI/src/Implementation/Component/Listing/Workflow/Renderer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected function render_linear(Linear $component, RendererInterface $default_r
6969

7070
if ($index === $component->getActive()) {
7171
$tpl->touchBlock('active');
72+
$tpl->touchBlock('active_aria');
7273
$component = $component->withAdditionalOnLoadCode(
7374
fn($id) => "
7475
window.requestAnimationFrame(() => {

components/ILIAS/UI/src/templates/default/Listing/tpl.linear.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3 class="il-workflow-title">{TITLE}</h3>
1717
<!-- BEGIN status_inprogress --> in-progress<!-- END status_inprogress -->
1818
<!-- BEGIN status_completed_successfully --> completed-successfully<!-- END status_completed_successfully -->
1919
<!-- BEGIN status_completed_unsuccessfully --> completed-unsuccessfully<!-- END status_completed_unsuccessfully -->
20-
">
20+
" <!-- BEGIN active_aria -->aria-current="step"<!-- END active_aria -->>
2121

2222
<div class="text">
2323
<span class="il-workflow-step-label">{LABEL}</span>

components/ILIAS/UI/tests/Component/Listing/Workflow/LinearWorkflowTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testLinearWorkflowRendering(): void
110110
<span class="il-workflow-step-description"></span>
111111
</div>
112112
</li>
113-
<li class="il-workflow-step last active not-started">
113+
<li class="il-workflow-step last active not-started" aria-current="step">
114114
<div class="text">
115115
<span class="il-workflow-step-label"></span>
116116
<span class="il-workflow-step-description"></span>

0 commit comments

Comments
 (0)