Compare commits

..
Author SHA1 Message Date
Raphael Michel a0cb31249b [A11y] Form JavaScript: Support for <button formnovalidate> 2026-09-08 22:18:27 +02:00
2 changed files with 3 additions and 18 deletions
@@ -171,28 +171,12 @@ body.has-modal-dialog .container, body.has-modal-dialog #wrapper {
width: fit-content;
max-width: 80%;
min-width: 24em;
max-height: 80vh;
margin-top: 10vh;
.modal-card-content {
// not symmetric, but LOOKS more symmetric since the picture has so much more optical weight than the caption
padding: 2.5em 2.5em 1.5em 2.5em;
max-height: 80vh;
}
figure {
display: flex;
flex-direction: column;
max-height: calc(80vh - 4em);
padding: 2.5em;
}
img {
width: auto;
object-fit: contain;
height: 100%;
flex-basis: 10%;
flex-grow: 1;
flex-shrink: 1;
max-width: 100%;
}
button {
@@ -234,6 +234,7 @@ var form_handlers = function (el) {
function setup_basics(el) {
el.find("form").attr("novalidate", true).on("submit", function (e) {
if (e.originalEvent.submitter.formNoValidate) return;
if (!this.checkValidity()) {
var input = this.querySelector(":invalid:not(fieldset)");
(input.labels[0] || input).scrollIntoView();