forked from mirrors/bookwyrm
Fix linting errors
This commit is contained in:
parent
89bbf005c3
commit
c924f578e5
3 changed files with 16 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue