From 568619b92e405ffb0c5b9691d8e49f696aec3941 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Sun, 1 Dec 2019 19:31:19 +0100 Subject: [PATCH] Form: allow checkboxes to be required --- library/Icinga/Web/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index e68c63eff..06694acbd 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -1015,7 +1015,7 @@ class Form extends Zend_Form */ public function ensureElementAccessibility(Zend_Form_Element $element) { - if ($element->isRequired() && strpos(strtolower($element->getType()), 'checkbox') === false) { + if ($element->isRequired()) { $element->setAttrib('aria-required', 'true'); // ARIA $element->setAttrib('required', ''); // HTML5 if (($cue = $this->getRequiredCue()) !== null && ($label = $element->getDecorator('label')) !== false) {