forked from CGM_Public/pretix_original
[A11y] add skip-link to main content (#5087)
* [A11y] add skip-link to main content * fix contrast for skip-link * fix overlay with back-to-organizer-link * add fallback if no main-element * update nav-label
This commit is contained in:
committed by
GitHub
parent
6d0368a1bb
commit
caf291630c
@@ -263,6 +263,10 @@ function setup_basics(el) {
|
||||
|
||||
el.find(".js-only").removeClass("js-only");
|
||||
el.find(".js-hidden").hide();
|
||||
// make sure to always have a #content for skip-link to work
|
||||
if (!document.querySelector("#content")) {
|
||||
(document.querySelector('main') || document.querySelector('.page-header + *')).id = "content"
|
||||
}
|
||||
|
||||
el.find("div.collapsed").removeClass("collapsed").addClass("collapse");
|
||||
el.find(".has-error, .alert-danger").each(function () {
|
||||
|
||||
Reference in New Issue
Block a user