Skip link là <a> ẩn ở đầu trang, hiện ra khi nhận focus bằng Tab đầu tiên, cho phép nhảy thẳng đến #main-content.
- Giúp keyboard/screen reader users không phải tab qua toàn bộ navigation (có thể 30+ links) ở mỗi trang.
- Implement:
<a class="skip-link" href="#main">Bỏ qua navigation</a>+ CSS.skip-link { position: absolute; top: -40px } .skip-link:focus { top: 0 }. - WCAG 2.4.1 yêu cầu bypass mechanism.
- Test: nhấn Tab ngay sau khi load trang, link phải hiện ra.
A skip link is a hidden <a> at the top of the page that appears when focused via the first Tab keypress, allowing users to jump directly to #main-content.
- It saves keyboard/screen reader users from tabbing through all navigation links (potentially 30+) on every page.
- Implementation:
<a class="skip-link" href="#main">Skip navigation</a>+ CSS.skip-link { position: absolute; top: -40px } .skip-link:focus { top: 0 }. - WCAG 2.4.1 requires a bypass mechanism.
- Test: press Tab immediately after the page loads; the link must appear.