From d7321f54c9f7257b0c8677a2c3db016885b94d1c Mon Sep 17 00:00:00 2001 From: Satyam Date: Tue, 10 Feb 2026 11:42:42 +0100 Subject: [PATCH] Enhance formSelect with aria-label for accessibility --- .../ILIAS/Table/classes/class.ilTable2GUI.php | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/components/ILIAS/Table/classes/class.ilTable2GUI.php b/components/ILIAS/Table/classes/class.ilTable2GUI.php index 7f8942863522..b330666c9c07 100755 --- a/components/ILIAS/Table/classes/class.ilTable2GUI.php +++ b/components/ILIAS/Table/classes/class.ilTable2GUI.php @@ -2256,8 +2256,12 @@ public function fillActionRow(): void $button["sel_var"], $button["options"], false, - true + true, + 0, + "", + array("aria-label" => $lng->txt("action")) ) + ); $this->tpl->setVariable("MI_BTN_NAME", $button["cmd"]); $this->tpl->setVariable("MI_BTN_VALUE", $button["text"]); @@ -2272,8 +2276,12 @@ public function fillActionRow(): void $button["sel_var"] . "_2", $button["options"], false, - true + true, + 0, + "", + array("aria-label" => $lng->txt("action")) ) + ); $this->tpl->setVariable("MI_BTN_NAME", $button["cmd"]); $this->tpl->setVariable("MI_BTN_VALUE", $button["text"]); @@ -2299,8 +2307,18 @@ public function fillActionRow(): void } $this->tpl->setVariable( "SELECT_CMDS", - ilLegacyFormElementsUtil::formSelect("", "selected_cmd", $sel, false, true) + ilLegacyFormElementsUtil::formSelect( + "", // selected + "selected_cmd2", // name + $sel, // options + false, // use_multi + true, // submit_after_change + 0, // size + "", // css class + array("aria-label" => $lng->txt("action")) + ) ); + $this->tpl->setVariable("TXT_EXECUTE", $lng->txt("execute")); $this->tpl->parseCurrentBlock(); $arrow = true; @@ -2320,7 +2338,16 @@ public function fillActionRow(): void } $this->tpl->setVariable( "SELECT_CMDS", - ilLegacyFormElementsUtil::formSelect("", "selected_cmd2", $sel, false, true) + ilLegacyFormElementsUtil::formSelect( + "", // selected + "selected_cmd2", // name + $sel, // options + false, // use_multi + true, // submit_after_change + 0, // size + "", // css class + array("aria-label" => $lng->txt("action")) + ) ); $this->tpl->setVariable("TXT_EXECUTE", $lng->txt("execute")); $this->tpl->parseCurrentBlock();