-
Notifications
You must be signed in to change notification settings - Fork 1
Description
A toggle slider that is flagged as autosubmit element, must be marked as such in the UI. This serves the following purposes:
- Enhanced accessibility (https://www.w3.org/TR/WCAG22/#on-input)
- Indicating progress in case the response takes time
It also fixes the following issue:
When a form is submitted, Icinga Web looks for an element to indicate progress. In case a toggle slider has autosubmit capability and a button with a progress label exists, the button is currently animated. This gives a false impression on what is happening. To preserve compatibility with older versions of Icinga Web, this change should be made and preferred since a fix in Icinga Web would need to be backported. Adding the autosubmit indicator for toggle sliders should also lead to it being animatable and implicitly avoids this issue from occurring.
Implementation
A new decorator should be responsible for this. It's sole purpose is to mark autosubmit elements visually as such. For now it only needs to support checkboxes.
The visual clue only enhances visual accessibility. To also ensure accessibility for impaired users, the decorator also needs to add an additional visually hidden element containing the same warning text and reference it on the input in the attribute aria-describedby.
Legacy Icinga Web forms support this for a long time already and may serve as reference.