Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Pagination: page button aria-labels are not translated on small screens

オープン 初心者向け
#11,427 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Singmin がすでに取り組んでいます。

2026年10月28日 から。

  • #11429 @Singmin による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

packages/ra-ui-materialui/src/list/pagination/Pagination.tsx を開き、すでに getItemAriaLabel={labelItem} を渡しているデスクトップ分岐と、isSmall 分岐(コンパクトな TablePagination をレンダーする)を比較してください。small 分岐に同じ prop を追加し、そのフォルダーでページネーションのテスト(例: Pagination.spec.tsx)を実行して、小さい画面でのレンダリングに関する既存のアサーションが引き続き通ることを確認してください。狭い幅で矢印ボタンがデスクトップと同様に翻訳済みの ra.navigation.* ラベルを備えていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

What you were expecting:
On every screen size, the pagination buttons ("first", "previous", "next", "last") use the translated ra.navigation.* labels, as they do on desktop.

What happened instead:
Below the md breakpoint, <Pagination> renders the compact TablePagination without getItemAriaLabel, so MUI's English defaults are used ("Go to next page", "Go to previous page") whatever the locale. Screen reader users get English labels in a French or Spanish app.

Steps to reproduce:

  1. Open the demo https://marmelab.com/react-admin-demo/ and sign in (demo / demo).
  2. Switch the language to French with the app bar menu.
  3. Open the Reviews list on a wide screen and inspect the "next page" arrow button: aria-label="Aller à la prochaine page".
  4. Switch to a phone width (e.g. 360 px, device toolbar) and reload, then inspect the "next page" arrow next to "1-25 sur 320": aria-label="Go to next page". The visible "1-25 sur 320" text is translated; only the arrow buttons' aria-labels (read by screen readers) are not.

Related code:
packages/ra-ui-materialui/src/list/pagination/Pagination.tsx: the desktop branch passes getItemAriaLabel={labelItem}, the isSmall branch does not. Adding the same prop to the small TablePagination fixes it:

<TablePagination
    ...
    labelDisplayedRows={labelDisplayedRows}
    getItemAriaLabel={labelItem}
    slotProps={slotProps}
    {...sanitizeListRestProps(rest)}
/>

Other information:
Workaround: add MUI's locale (frFR, esES… from @mui/material/locale) to the theme.

Environment

  • React-admin version: 5.15.5 (still the same on master)
  • React version: 18.3.1
  • Browser: Chrome and Safari (WebKit)
主要言語
TypeScript
スター
27k
フォーク
5.5k
平均マージ
1日 3分
マージ済み PR(30日)
32

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

marmelab/react-admin のほかの issue

marmelab/react-admin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。