웹 접근성 조치

This commit is contained in:
2026-10-06 14:32:26 +09:00
parent 24c5dce24d
commit d3c39caefb
90 changed files with 365 additions and 277 deletions
@@ -103,7 +103,8 @@ export function LNB({
control.tabIndex >= 0 &&
!control.hasAttribute("disabled") &&
control.getAttribute("aria-disabled") !== "true" &&
!control.closest('[hidden], [aria-hidden="true"]'),
!control.closest('[hidden], [aria-hidden="true"]') &&
control.getClientRects().length > 0,
);
const currentIndex = menuControls.findIndex(
(control) =>
@@ -120,6 +121,19 @@ export function LNB({
event.preventDefault();
nextControl.focus();
nextControl.scrollIntoView({ block: "nearest" });
} else if (
isMobile &&
!event.shiftKey &&
currentIndex === menuControls.length - 1
) {
const closeButton = event.currentTarget
.closest<HTMLElement>('[data-sidebar="sidebar"]')
?.querySelector<HTMLElement>(":scope > button");
if (closeButton) {
event.preventDefault();
closeButton.focus();
}
}
}