From 31dcf6dcf9e6198d807d823b2570b948f462fd0b Mon Sep 17 00:00:00 2001 From: Marvin Hackfort Date: Mon, 23 Mar 2026 09:58:29 +0100 Subject: [PATCH] Fix screenreader labeling for legacy radio groups (Mantis 0044421) Use
/ with the property title so grouped legacy radio buttons are announced correctly. --- components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php | 4 ++++ components/ILIAS/Form/templates/default/tpl.prop_radio.html | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php b/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php index a4f0f10f1162..81c222faa30d 100755 --- a/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilRadioGroupInputGUI.php @@ -110,6 +110,10 @@ public function insert(ilTemplate $a_tpl): void public function render(): string { $tpl = new ilTemplate("tpl.prop_radio.html", true, true, "components/ILIAS/Form"); + $group_label = $this->getHiddenTitle() !== "" + ? $this->getHiddenTitle() + : $this->getTitle(); + $tpl->setVariable("GROUP_LABEL", $group_label); foreach ($this->getOptions() as $option) { // information text for option diff --git a/components/ILIAS/Form/templates/default/tpl.prop_radio.html b/components/ILIAS/Form/templates/default/tpl.prop_radio.html index 99d0acbb94b1..2cb3e307506a 100755 --- a/components/ILIAS/Form/templates/default/tpl.prop_radio.html +++ b/components/ILIAS/Form/templates/default/tpl.prop_radio.html @@ -1,4 +1,5 @@ -
+
+ {GROUP_LABEL}
\ No newline at end of file +
\ No newline at end of file