You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/components/pagination.mdx
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ Looking to use an icon or symbol in place of text for some pagination links? Be
46
46
47
47
Pagination links are customizable for different circumstances. Use `.disabled` for links that appear un-clickable and `.active` to indicate the current page.
48
48
49
+
`aria-current="page"` should be put on the link element for the assistive technology to recognize the active element.
50
+
49
51
While the `.disabled` class uses `pointer-events: none` to _try_ to disable the link functionality of `<a>`s, that CSS property is not yet standardized and doesn’t account for keyboard navigation. As such, you should always add `tabindex="-1"` on disabled links and use custom JavaScript to fully disable their functionality.
50
52
51
53
<Examplecode={`<nav aria-label="...">
@@ -54,8 +56,8 @@ While the `.disabled` class uses `pointer-events: none` to _try_ to disable the
@@ -64,16 +66,16 @@ While the `.disabled` class uses `pointer-events: none` to _try_ to disable the
64
66
</ul>
65
67
</nav>`} />
66
68
67
-
You can optionally swap out active or disabled anchors for `<span>`, or omit the anchor in the case of the prev/next arrows, to remove click functionality and prevent keyboard focus while retaining intended styles.
69
+
You can optionally swap out disabled anchors for `<span>`, or omit the anchor in the case of the prev/next arrows, to remove click functionality and prevent keyboard focus while retaining intended styles.
0 commit comments