Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Global] Active pagination nav control issues #960

Open
svinkle opened this issue Dec 2, 2021 · 0 comments
Open

[Global] Active pagination nav control issues #960

svinkle opened this issue Dec 2, 2021 · 0 comments
Labels
Category: Accessibility Bugs found while using assistive technology Critical Path: 2 Affects some merchants/buyers Effort: Low Severity: 3 Normal/Low Severity

Comments

@svinkle
Copy link
Member

svinkle commented Dec 2, 2021

Issue summary

The active pagination item features aria-* attributes which may not be well supported on the current element. This could lead to a confusing user experience when assistive technology is unable to accurately convey the purpose or state of the element.

In addition, the visual treatment of the active, yet inactive control features an underline. This could confuse sighted users into thinking the control is available to be activated.

Screenshots Dawn glob post. Underlined, inactive, pagination control is highlighted.

Current code

HTML

<span
  class="pagination__item pagination__item--current"
  aria-current="page"
  aria-label="Page 1"
>
  1
</span>

CSS

.pagination__item--current::after,
.pagination__item:hover::after {
  content: '';
  display: block;
  width: 2rem;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: currentColor;
}

Steps to reproduce

  1. Go to a Dawn theme store with any supported browser
  2. Navigate to a collection page or blog page with many comments
  3. Run axe DevTools and visually inspect the active control

Behavior

Expected

  1. aria-* to be applied to supported elements.
  2. A subdued visual indicating an inactive control.

Actual

  1. aria-* attributes are applied to low-supported elements.
  2. The inactive control appears actionable.

Recommendation

  1. Swap the span element for an a.
  2. Add the role attribute, setting its value to link – helps to share semantic meaning.
  3. Add the aria-disabled attribute, setting its value to true – helps to share element state.
  4. Adjust the visual affordance of the control by removing the underline and adding the light class. Use the [role="link"]:not([href]) selector for additional visual styling.

Recommended code

HTML

<a
  class="pagination__item pagination__item--current light"
  aria-current="page"
  aria-label="Page 1"
  role="link"
  aria-disabled="true"
>
  1
</a>

Specifications

@svinkle svinkle added Severity: 3 Normal/Low Severity Category: Accessibility Bugs found while using assistive technology Effort: Low Critical Path: 2 Affects some merchants/buyers labels Dec 2, 2021
@svinkle svinkle changed the title [Blog] Active pagination nav control issues [Global] Active pagination nav control issues Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Accessibility Bugs found while using assistive technology Critical Path: 2 Affects some merchants/buyers Effort: Low Severity: 3 Normal/Low Severity
Projects
None yet
Development

No branches or pull requests

1 participant