From 4157821c8920ce65271dd22d0e70210ff824aef7 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 5 Dec 2019 16:12:41 +0100 Subject: [PATCH] IcingaCheckbox: Don't `display:none` the checkbox but add `.sr-only` to it --- library/Icinga/Web/View/Helper/IcingaCheckbox.php | 1 + public/css/icinga/forms.less | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/library/Icinga/Web/View/Helper/IcingaCheckbox.php b/library/Icinga/Web/View/Helper/IcingaCheckbox.php index 88b6c7c43..786af1296 100644 --- a/library/Icinga/Web/View/Helper/IcingaCheckbox.php +++ b/library/Icinga/Web/View/Helper/IcingaCheckbox.php @@ -11,6 +11,7 @@ class IcingaCheckbox extends \Zend_View_Helper_FormCheckbox $attribs['id'] = $this->view->protectId('icingaCheckbox_' . $name); } + $attribs['class'] = (isset($attribs['class']) ? $attribs['class'] . ' ' : '') . 'sr-only'; $html = parent::formCheckbox($name, $value, $attribs, $checkedOptions); $class = 'toggle-switch'; diff --git a/public/css/icinga/forms.less b/public/css/icinga/forms.less index 726afb324..c1feae98e 100644 --- a/public/css/icinga/forms.less +++ b/public/css/icinga/forms.less @@ -299,11 +299,6 @@ form.icinga-form .form-controls { width: 2.625em; } -// Hide default checkbox -.icinga-controls input[type="checkbox"] { - display: none; -} - .icinga-controls .toggle-switch .toggle-slider { position: absolute; left: 0;