Skip to content

fix accessbility issue #346

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

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class Options extends React.Component {
value={(pageSize || pageSizeOptions[0]).toString()}
onChange={this.changeSize}
getPopupContainer={(triggerNode) => triggerNode.parentNode}
aria-label={locale.page_size}
defaultOpen={false}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultOpen={false}

defaultOpen={false} could be deleted.

Copy link
Contributor Author

@yuzdeng yuzdeng Sep 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need defaultOpen to set the Input components aria-expanded props and fix the accessibility issue. For the detail you can check my this comment: ant-design/ant-design#31692 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afc163 Any other problems here?

>
{options}
</Select>
Expand Down Expand Up @@ -158,6 +160,7 @@ class Options extends React.Component {
onChange={this.handleChange}
onKeyUp={this.go}
onBlur={this.handleBlur}
aria-label={locale.page}
/>
{locale.page}
{gotoButton}
Expand Down
3 changes: 2 additions & 1 deletion src/locale/ar_EG.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ الصفحة',
jump_to: 'الذهاب إلى',
jump_to_confirm: 'تأكيد',
page: '',
page: 'الصفحة',

// Pagination.jsx
prev_page: 'الصفحة السابقة',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'خمس صفحات تالية',
prev_3: 'ثلاث صفحات سابقة',
next_3: 'ثلاث صفحات تالية',
page_size: 'مقاس الصفحه',
};
1 change: 1 addition & 0 deletions src/locale/az_AZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Növbəti 5 Səhifə',
prev_3: 'Əvvəlki 3 Səhifə',
next_3: 'Növbəti 3 Səhifə',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/bg_BG.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Следващи 5 страници',
prev_3: 'Предишни 3 страници',
next_3: 'Следващи 3 страници',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/bn_BD.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ পৃষ্ঠা',
jump_to: 'যাও',
jump_to_confirm: 'নিশ্চিত',
page: '',
page: 'পৃষ্ঠা',

// Pagination.jsx
prev_page: 'আগের পৃষ্ঠা',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'পরবর্তী ৫ পৃষ্ঠা',
prev_3: 'পূর্ববর্তী ৩ পৃষ্ঠা',
next_3: 'পরবর্তী ৩ পৃষ্ঠা',
page_size: 'পাতার আকার',
};
27 changes: 14 additions & 13 deletions src/locale/by_BY.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
export default {
// Options.jsx
items_per_page: '/старонка',
jump_to: 'Перайсці',
jump_to_confirm: 'Пацвердзіць',
page: '',
// Pagination.jsx
prev_page: 'Назад',
next_page: 'Наперад',
prev_5: 'Папярэднія 5',
next_5: 'Наступныя 5',
prev_3: 'Папярэднія 3',
next_3: 'Наступныя 3',
};
// Options.jsx
items_per_page: '/старонка',
jump_to: 'Перайсці',
jump_to_confirm: 'Пацвердзіць',
page: '',
// Pagination.jsx
prev_page: 'Назад',
next_page: 'Наперад',
prev_5: 'Папярэднія 5',
next_5: 'Наступныя 5',
prev_3: 'Папярэднія 3',
next_3: 'Наступныя 3',
page_size: 'памер старонкі',
};
1 change: 1 addition & 0 deletions src/locale/ca_ES.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '5 pàgines següents',
prev_3: '3 pàgines prèvies',
next_3: '3 pàgines següents',
page_size: 'mida de la pàgina',
};
1 change: 1 addition & 0 deletions src/locale/cs_CZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Následujících 5 stran',
prev_3: 'Předchozí 3 strany',
next_3: 'Následující 3 strany',
page_size: 'velikost stránky',
};
3 changes: 2 additions & 1 deletion src/locale/da_DK.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ side',
jump_to: 'Gå til',
jump_to_confirm: 'bekræft',
page: '',
page: 'Side',

// Pagination.jsx
prev_page: 'Forrige Side',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'Næste 5 Sider',
prev_3: 'Forrige 3 Sider',
next_3: 'Næste 3 Sider',
page_size: 'sidestørrelse',
};
3 changes: 2 additions & 1 deletion src/locale/de_DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ Seite',
jump_to: 'Gehe zu',
jump_to_confirm: 'bestätigen',
page: '',
page: 'Seite',

// Pagination.jsx
prev_page: 'Vorherige Seite',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '5 Seiten vor',
prev_3: '3 Seiten zurück',
next_3: '3 Seiten vor',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/el_GR.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Επόμενες 5 σελίδες',
prev_3: 'Προηγούμενες 3 Σελίδες',
next_3: 'Επόμενες 3 Σελίδες',
page_size: 'Μέγεθος σελίδας',
};
3 changes: 2 additions & 1 deletion src/locale/en_GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ page',
jump_to: 'Go to',
jump_to_confirm: 'confirm',
page: '',
page: 'Page',

// Pagination.jsx
prev_page: 'Previous Page',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ page',
jump_to: 'Go to',
jump_to_confirm: 'confirm',
page: '',
page: 'Page',

// Pagination.jsx
prev_page: 'Previous Page',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/es_ES.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ página',
jump_to: 'Ir a',
jump_to_confirm: 'confirmar',
page: '',
page: 'Página',

// Pagination.jsx
prev_page: 'Página anterior',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '5 páginas siguientes',
prev_3: '3 páginas previas',
next_3: '3 páginas siguientes',
page_size: 'tamaño de página',
};
1 change: 1 addition & 0 deletions src/locale/et_EE.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Järgmised 5 lehekülge',
prev_3: 'Eelmised 3 lehekülge',
next_3: 'Järgmised 3 lehekülge',
page_size: 'lehe suurus',
};
1 change: 1 addition & 0 deletions src/locale/fa_IR.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '۵ صفحه بعدی',
prev_3: '۳ صفحه قبلی',
next_3: '۳ صفحه بعدی',
page_size: 'اندازه صفحه',
};
3 changes: 2 additions & 1 deletion src/locale/fi_FI.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ sivu',
jump_to: 'Mene',
jump_to_confirm: 'Potvrdite',
page: '',
page: 'Sivu',

// Pagination.jsx
prev_page: 'Edellinen sivu',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'Seuraavat 5 sivua',
prev_3: 'Edelliset 3 sivua',
next_3: 'Seuraavat 3 sivua',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/fr_BE.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/fr_CA.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: '',
page: 'Page',

// Pagination.jsx
prev_page: 'Page précédente',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'taille de la page',
};
3 changes: 2 additions & 1 deletion src/locale/fr_FR.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: '',
page: 'Page',

// Pagination.jsx
prev_page: 'Page précédente',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
page_size: 'taille de la page',
};
1 change: 1 addition & 0 deletions src/locale/ga_IE.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Ar Aghaidh 5 Leathanaigh',
prev_3: '3 leathanach roimhe seo',
next_3: 'Ar Aghaidh 3 Leathanaigh',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/gl_ES.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '5 páxinas seguintes',
prev_3: '3 páxinas previas',
next_3: '3 páxinas seguintes',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/he_IL.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '5 עמודים הבאים',
prev_3: '3 עמודים קודמים',
next_3: '3 עמודים הבאים',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/hi_IN.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'अगले 5 पृष्ठ',
prev_3: 'पिछले 3 पृष्ठ',
next_3: 'अगले 3 पेज',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/hr_HR.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Sljedećih 5 stranica',
prev_3: 'Prijašnje 3 stranice',
next_3: 'Sljedeće 3 stranice',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/hu_HU.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Következő 5 oldal', // 'Next 5 Pages',
prev_3: 'Előző 3 oldal', // 'Previous 3 Pages',
next_3: 'Következő 3 oldal', // 'Next 3 Pages',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/id_ID.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ halaman',
jump_to: 'Menuju',
jump_to_confirm: 'konfirmasi',
page: '',
page: 'Halaman',

// Pagination.jsx
prev_page: 'Halaman Sebelumnya',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '5 Halaman Berikutnya',
prev_3: '3 Halaman Sebelumnya',
next_3: '3 Halaman Berikutnya',
page_size: 'ukuran halaman',
};
1 change: 1 addition & 0 deletions src/locale/is_IS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Áfram 5 síður',
prev_3: 'Til baka 3 síður',
next_3: 'Áfram 3 síður',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/it_IT.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ pagina',
jump_to: 'vai a',
jump_to_confirm: 'Conferma',
page: '',
page: 'Pagina',

// Pagination.jsx
prev_page: 'Pagina precedente',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: 'Prossime 5 pagine',
prev_3: 'Precedente 3 pagine',
next_3: 'Prossime 3 pagine',
page_size: 'dimensioni della pagina',
};
1 change: 1 addition & 0 deletions src/locale/ja_JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '次 5ページ',
prev_3: '前 3ページ',
next_3: '次 3ページ',
page_size: 'ページサイズ',
};
1 change: 1 addition & 0 deletions src/locale/ka_GE.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export default {
next_5: 'შემდეგი 5 გვერდი',
prev_3: 'წინა 3 გვერდი',
next_3: 'შემდეგი 3 გვერდი',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/kk_KZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Келесі 5',
prev_3: 'Алдыңғы 3',
next_3: 'Келесі 3',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/km_KH.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '៥ ទំព័រទៅមុខ',
prev_3: '៣ ទំព័រថយក្រោយ',
next_3: '៣ ទំព័រទៅមុខ',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/kmr_IQ.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: '5 Rûpelên Paş',
prev_3: '3 Rûpelên Pêş',
next_3: '3 Rûpelên Paş',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/kn_IN.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'ಮುಂದಿನ 5 ಪುಟಗಳು',
prev_3: 'ಹಿಂದಿನ 3 ಪುಟಗಳು',
next_3: 'ಮುಂದಿನ 3 ಪುಟಗಳು',
page_size: 'Page Size',
};
3 changes: 2 additions & 1 deletion src/locale/ko_KR.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
items_per_page: '/ 쪽',
jump_to: '이동하기',
jump_to_confirm: '확인하다',
page: '',
page: '페이지',

// Pagination.jsx
prev_page: '이전 페이지',
Expand All @@ -12,4 +12,5 @@ export default {
next_5: '다음 5 페이지',
prev_3: '이전 3 페이지',
next_3: '다음 3 페이지',
page_size: '페이지 크기',
};
1 change: 1 addition & 0 deletions src/locale/lt_LT.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Peršokti 5 pls.',
prev_3: 'Grįžti 3 pls.',
next_3: 'Peršokti 3 pls.',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/lv_LV.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Nākamās 5 lapas',
prev_3: 'Iepriekšējās 3 lapas',
next_3: 'Nākamās 3 lapas',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/mk_MK.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'Наредни 5 страници',
prev_3: 'Претходни 3 страници',
next_3: 'Наредни 3 страници',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/ml_IN.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'അടുത്ത 5 പേജുകൾ',
prev_3: 'മുൻപുള്ള 3 പേജുകൾ',
next_3: 'അടുത്ത 3 പേജുകൾ',
page_size: 'Page Size',
};
1 change: 1 addition & 0 deletions src/locale/mm_MM.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default {
next_5: 'နောက် ၅ခုမြောက်',
prev_3: 'ယခင် ၃ခုမြောက်',
next_3: 'နောက် ၃ခုမြောက်',
page_size: 'Page Size',
};
Loading