diff --git a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Renderer.php index 51d1318e4594..981bdc4b5393 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/Symbol/Glyph/Renderer.php @@ -66,6 +66,17 @@ public function render(Component\Component $component, RendererInterface $defaul $tpl = $this->renderLabel($component, $tpl); + if (!$this instanceof ButtonContextRenderer + && ($component->getType() === Component\Symbol\Glyph\Glyph::EXPAND + || $component->getType() === Component\Symbol\Glyph\Glyph::COLLAPSE)) { + $tpl->setCurrentBlock("with_aria_expanded"); + $tpl->setVariable( + "ARIA_EXPANDED", + $component->getType() === Component\Symbol\Glyph\Glyph::COLLAPSE ? "true" : "false" + ); + $tpl->parseCurrentBlock(); + } + $id = $this->bindJavaScript($component); if ($id !== null) { diff --git a/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.standard.html b/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.standard.html index 7da77fabbc12..15e1c8bc5397 100755 --- a/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.standard.html +++ b/components/ILIAS/UI/src/templates/default/Symbol/tpl.glyph.standard.html @@ -1,3 +1,3 @@ -tabindex="0" class="glyph highlighted disabled" href="{ACTION}" aria-label="{LABEL}" aria-disabled="{ARIA_DISABLED}" id="{ID}"> +tabindex="0" class="glyph highlighted disabled" href="{ACTION}" aria-label="{LABEL}" aria-disabled="{ARIA_DISABLED}" aria-expanded="{ARIA_EXPANDED}" id="{ID}"> {GLYPH} diff --git a/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php index 2b82067e82c8..067913a5e46f 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php @@ -294,12 +294,12 @@ public function testRenderWithMetadata(): void