Skip to content

Pagination views use unlocalized aria-labels #56102

@andylolz

Description

@andylolz

Laravel Version

12.19.3

PHP Version

8.3.22

Database Driver & Version

No response

Description

The simple bootstrap 5 and simple tailwind pagination views both use the aria-label “Pagination Navigation”, but this string is hardcoded in English, instead of being localized using __().

<nav role="navigation" aria-label="Pagination Navigation">

<nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between">

The equivalent strings for the (non-simple) tailwind pagination view is localized:

<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between">


I see that this change was previously made in #39928, which localized the string and changed the label text. This change was subsequently reverted in #40054, because the new label text caused problems. Here, I’m just proposing the localization change.

Steps To Reproduce

I’ve created a demo repo here:
https://github.com/andylolz/pagination-localisation-laravel-demo

I’ve set the locale to fr, and have added a lang/fr.json that includes a translation for “Pagination Navigation”. This translation is used by the Tailwind pagination view, but not by simple Tailwind or simple Bootstrap 5:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions