@dachary Yes we could try to convert this into a no JS modal dialog.
In theory it’s possible to do this client side with no JS by following a similar pattern to the menu.sass module; using a checkbox to toggle a modal dialog that interrupts the journalist.
But it’ll be a bit more complicated because:
When the modal opens, the checkbox’s label would need to become an invisible overlay similar to menu.sass that closes the modal when the user clicks outside of it. However, to allow for a CANCEL action and the ‘X’ with no JS in the window, the close overlay would actually need to cover those two areas of the modal as well (see the blue area in image below). But the DELETE action would need to be placed above the content area to still allow for interaction - this could be done with z-index. Ideally the title and content text would also be placed above the cancel overlay to allow interaction:
Note that the blue area (close overlay) needs to extend to the edges of the screen, I just left it smaller here to see the difference between this and the semi-transparent gray overlay that is behind the entire modal.
All this will also all need to be kept inside the
<form> so the post still works when the DELETE inside the modal is clicked (the other DELETE becomes the checkbox label).
I’m not sure if all this will work together neatly in the HTML structure, I haven’t made a modal without JS before. Once created though, it could be useful for other dangerous actions elsewhere.