skip link
This commit is contained in:
1 parent
b479c59174
commit
f17d48030c
6 files changed
+40
-11
No files matched your search
@@ -22,6 +22,13 @@ const constructMenuLink = function(title, href) {
|
||||
return a;
|
||||
}
|
||||
|
||||
const constructSkipLink = function() {
|
||||
const a = constructMenuLink("skip", "#main");
|
||||
a.id = "skip";
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
const constructDropdown = function() {
|
||||
const div = document.createElement("div");
|
||||
div.id = "dropdown";
|
||||
@@ -31,6 +38,7 @@ const constructDropdown = function() {
|
||||
button.id="drop-button";
|
||||
button.ariaLabel = "card submenu";
|
||||
button.ariaExpanded = "false";
|
||||
button.type = "button";
|
||||
button.setAttribute("aria-controls", "drop-content");
|
||||
div.append(button);
|
||||
|
||||
@@ -50,6 +58,7 @@ const constructDropdown = function() {
|
||||
|
||||
const constructNav = function() {
|
||||
const nav = document.getElementById("top-nav");
|
||||
nav.append(constructSkipLink());
|
||||
nav.append(constructMenuLink("home", "/"));
|
||||
nav.append(constructDropdown());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user