We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ee8dbf commit 502fb1cCopy full SHA for 502fb1c
scripts/scripts.js
@@ -69,8 +69,8 @@ function a11yLinks(main) {
69
const links = main.querySelectorAll('a');
70
links.forEach((link) => {
71
let label = link.textContent;
72
- if (link.querySelector(':scope > span[class*="icon"]')) {
73
- const icon = link.querySelector(':scope > span[class*="icon"]');
+ if (!label && link.querySelector('span.icon')) {
+ const icon = link.querySelector('span.icon');
74
label = icon ? icon.classList[1]?.split('-')[1] : label;
75
}
76
link.setAttribute('aria-label', label);
0 commit comments