With modals becoming more active in Koha, I think we need to move away from alert messages and stick with modals.
Alert messages look different from browser to browser, and you have less/no control over the look and feel of the alert.
Modals would allow for more enhancement, such as color and sound, if someone chose that.
The big concern is consistency. We lack consistency between alerts and modals, and with alerts between browsers.
I would proposed a stop on use of alert messages, and convert existing uses of alerts to modal.
That's my opinion. Would like to hear others.
I think it's important to distinguish between a couple of different situations in which we ask the user for confirmation of an action:
- "Simple" delete confirmations, where we ask
"Are you sure? Yes/No" -- Usually a JS alert
- Confirmation requests which display more information
for the user to consider before they confirm. Commonly
seen in Administration scripts.
The latter of those two seem more suited to conversion to modals, although it would require API work to ensure that the additional information could be pulled via AJAX for display in the modal. For instance: "This library cannot be deleted. Patrons or items are still using it."
I don't find the visual consistency between browsers to be an issue. I would think people know what their browser's alerts look like and are not concerned that they look different from another browser's alert.
Going forward I think we should keep in mind that the conversion to modals isn't simple template work (for the AJAXy reason above) and without that problem prepared for we'll still be stuck with inconsistency for quite a while.
We seem to be moving in this direction.
I would like to keep this open because I have some patches in progress.