Skip to content

Commit 502fb1c

Browse files
committed
chore: adding suggested review comments
1 parent 5ee8dbf commit 502fb1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/scripts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ function a11yLinks(main) {
6969
const links = main.querySelectorAll('a');
7070
links.forEach((link) => {
7171
let label = link.textContent;
72-
if (link.querySelector(':scope > span[class*="icon"]')) {
73-
const icon = link.querySelector(':scope > span[class*="icon"]');
72+
if (!label && link.querySelector('span.icon')) {
73+
const icon = link.querySelector('span.icon');
7474
label = icon ? icon.classList[1]?.split('-')[1] : label;
7575
}
7676
link.setAttribute('aria-label', label);

0 commit comments

Comments
 (0)