Restore tab index for linkless nav elements
This commit is contained in:
parent
c71fab3342
commit
0be8fc9b97
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@fwdekker/template",
|
||||
"version": "3.3.8",
|
||||
"version": "3.3.9",
|
||||
"description": "The base template for pages on fwdekker.com.",
|
||||
"author": "Florine W. Dekker",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -134,6 +134,7 @@ function unpackEntry(entry: any, parentPath: string = "/", highlightPath?: strin
|
|||
|
||||
const a = document.createElement("a");
|
||||
a.innerText = entry.name;
|
||||
a.tabIndex = 0;
|
||||
if (hasChildren) {
|
||||
const depth = parentPath.split("/").length - 2; // -1 because count parts, then another -1 because of leading /
|
||||
a.innerText += ` ${depth === 0 ? "▾" : "▸"}`;
|
||||
|
|
Loading…
Reference in New Issue