Fix linting errors

This commit is contained in:
Joachim 2021-11-28 18:26:01 +01:00
parent 89bbf005c3
commit c924f578e5
3 changed files with 16 additions and 2 deletions

View file

@ -30,15 +30,19 @@ body {
overflow-x: auto;
}
/* stylelint-disable no-descending-specificity */
.modal-card:focus {
outline-style: auto;
}
.modal-card:focus:not(:focus-visible) {
outline-style: initial;
}
.modal-card:focus-visible {
outline-style: auto;
}
/* stylelint-disable no-descending-specificity */
.modal-card.is-fullwidth {
min-width: 75% !important;

View file

@ -414,7 +414,17 @@ let BookWyrm = new class {
}
function handleFocusTrap(event) {
const focusableEls = event.currentTarget.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');
const focusableEls = event.currentTarget.querySelectorAll(
[
'a[href]:not([disabled])',
'button:not([disabled])',
'textarea:not([disabled])',
'input[type="text"]:not([disabled])',
'input[type="radio"]:not([disabled])',
'input[type="checkbox"]:not([disabled])',
'select:not([disabled])'
].join(',')
);
const firstFocusableEl = focusableEls[0];
const lastFocusableEl = focusableEls[focusableEls.length - 1];

View file

@ -285,7 +285,7 @@
</button>
</footer>
</div>
<button type="button" data-modal-close class="modal-close is-large" aria-label="{% trans 'Close' %}"></a>
<button type="button" data-modal-close class="modal-close is-large" aria-label="{% trans 'Close' %}"></button>
</div>
{% endif %}