Improved tabbing behavior in tabs mode

This commit is contained in:
squidfunk
2018-01-11 22:23:04 +01:00
committed by Martin Donath
parent 4026513889
commit 1020185c82
6 changed files with 28 additions and 15 deletions

View File

@@ -304,7 +304,8 @@ function initialize(config) { // eslint-disable-line func-style
const labels = document.querySelectorAll(
"[data-md-component=navigation] .md-nav__link[for]:not([tabindex])")
Array.prototype.forEach.call(labels, label => {
label.tabIndex = 0
if (label.offsetHeight)
label.tabIndex = 0
})
}
}).listen()