In olivero/templates/views/views-mini-pager.html.twig the following string wrongly has “>{{ 'Previous page'|t }}” when it should be “>{{ 'Next page'|t }}”.

          <li class="pager__item pager__item--control pager__item--next">
            <a href="{{ items.next.href }}" class="pager__link" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
              <span class="visually-hidden">{{ 'Previous page'|t }}</span>
              {% include "@olivero/../images/pager-previous.svg" %}
            </a>
          </li>

As a result, a screenreader will typically announce both “Previous page” and “Go to next page” to the user when focus is on this control.

I am also confused by “olivero/images/pager-previous.svg”, but there appears to be no “next.svg” file, so I am assuming that this is my lack of knowledge on these things.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Janner created an issue. See original summary.

mherchel’s picture

Issue summary: View changes
FileSize
125.95 KB

Confirmed. Great catch! Attaching screenshot to the summary.

I am also confused by “olivero/images/pager-previous.svg”, but there appears to be no “next.svg” file, so I am assuming that this is my lack of knowledge on these things.

yeah, we just mirror the "previous" image by applying transform: scalex(-1) in the CSS

mherchel’s picture

Title: Wrong text string in olivero/templates/views/views-mini-pager.html.twig » Views Mini Pager's next button labeled "Previous" for screen readers in Olivero
mherchel’s picture

Issue tags: +Accessibility, +Novice
immaculatexavier’s picture

Status: Active » Needs review
FileSize
855 bytes
119.03 KB

Attaching the patch and screenshot- Now Views Mini Pager's next button labeled to Next Page.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

  • lauriii committed eb2d361 on 10.1.x
    Issue #3291317 by immaculatexavier, mherchel, Janner, longwave: Views...

  • lauriii committed e37c1a6 on 10.0.x
    Issue #3291317 by immaculatexavier, mherchel, Janner, longwave: Views...

  • lauriii committed 721355c on 9.5.x
    Issue #3291317 by immaculatexavier, mherchel, Janner, longwave: Views...

  • lauriii committed a79be0b on 9.4.x
    Issue #3291317 by immaculatexavier, mherchel, Janner, longwave: Views...
lauriii’s picture

Version: 9.5.x-dev » 9.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed eb2d361 and pushed to 10.1.x. Cherry-picked to 10.0.x, 9.5.x, and 9.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.