From 703e83204b1067076d735d69d1260e9718b97ce7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Dec 2016 14:44:31 -0800 Subject: [PATCH] redo active and disabled docs snippets - remove screen reader stuff in favor of explicit labels - remove 4 and 5 items to keep examples simpler --- docs/components/pagination.md | 39 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/docs/components/pagination.md b/docs/components/pagination.md index 62536e1653..96c428c422 100644 --- a/docs/components/pagination.md +++ b/docs/components/pagination.md @@ -58,35 +58,23 @@ Looking to use an icon or symbol in place of text for some pagination links? Be ## Disabled and active states -Links are customizable for different circumstances. Use `.disabled` for unclickable links and `.active` to indicate the current page. +Pagination links are customizable for different circumstances. Use `.disabled` for links that appear un-clickable and `.active` to indicate the current page. -{% callout warning %} -#### Link functionality caveat - -The `.disabled` class uses `pointer-events: none` to try to disable the link functionality of ``s, but that CSS property is not yet standardized. In addition, even in browsers that do support `pointer-events: none`, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a `tabindex="-1"` attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality. -{% endcallout %} +While the `.disabled` class uses `pointer-events: none` to _try_ to disable the link functionality of ``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. {% example html %} @@ -98,12 +86,19 @@ You can optionally swap out active or disabled anchors for ``, or omit the {% endexample %} -- 2.47.2