mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-28 11:00:36 +00:00
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;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stylelint-disable no-descending-specificity */
|
||||||
.modal-card:focus {
|
.modal-card:focus {
|
||||||
outline-style: auto;
|
outline-style: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-card:focus:not(:focus-visible) {
|
.modal-card:focus:not(:focus-visible) {
|
||||||
outline-style: initial;
|
outline-style: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-card:focus-visible {
|
.modal-card:focus-visible {
|
||||||
outline-style: auto;
|
outline-style: auto;
|
||||||
}
|
}
|
||||||
|
/* stylelint-disable no-descending-specificity */
|
||||||
|
|
||||||
.modal-card.is-fullwidth {
|
.modal-card.is-fullwidth {
|
||||||
min-width: 75% !important;
|
min-width: 75% !important;
|
||||||
|
|
|
@ -414,7 +414,17 @@ let BookWyrm = new class {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleFocusTrap(event) {
|
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 firstFocusableEl = focusableEls[0];
|
||||||
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue