File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export type DsfrDataTableProps = {
3232 pages? : Page []
3333 pagination? : boolean
3434 paginationOptions? : number []
35+ paginationAriaLabel? : string
3536 currentPage? : number
3637 rowsPerPage? : number
3738 bottomActionBarClass? : string | Record <string , boolean > | Array <string | Record <string , boolean >>
@@ -50,6 +51,7 @@ const props = withDefaults(defineProps<DsfrDataTableProps>(), {
5051 10 ,
5152 20 ,
5253 ],
54+ paginationAriaLabel: ' Pagination' ,
5355})
5456
5557const emit = defineEmits <{
@@ -280,12 +282,12 @@ function copyToClipboard (text: string) {
280282 <div class =" flex gap-2 items-center" >
281283 <label
282284 class =" fr-label"
283- for =" pagination-options"
285+ : for =" `${id}- pagination-options` "
284286 >
285287 Résultats par page :
286288 </label >
287289 <select
288- id =" pagination-options"
290+ : id =" `${id}- pagination-options` "
289291 v-model =" rowsPerPage"
290292 class =" fr-select"
291293 @change =" onPaginationOptionsChange()"
@@ -314,6 +316,7 @@ function copyToClipboard (text: string) {
314316 <DsfrPagination
315317 v-model:current-page =" currentPage"
316318 :pages =" pages"
319+ :aria-label =" paginationAriaLabel"
317320 @update:current-page =" selection.length = 0"
318321 />
319322 </div >
Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ export type DsfrPaginationProps = {
88 nextPageTitle ?: string
99 prevPageTitle ?: string
1010 truncLimit ?: number
11+ ariaLabel ?: string
1112}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const props = withDefaults(defineProps<DsfrPaginationProps>(), {
1212 lastPageTitle: ' Dernière page' ,
1313 nextPageTitle: ' Page suivante' ,
1414 prevPageTitle: ' Page précédente' ,
15+ ariaLabel: ' Pagination' ,
1516})
1617
1718const emit = defineEmits <{ (e : ' update:current-page' , payload : number ): void }>()
@@ -39,7 +40,7 @@ const isCurrentPage = (page: Page) => props.pages.indexOf(page) === props.curren
3940 <nav
4041 role =" navigation"
4142 class =" fr-pagination"
42- aria-label =" Pagination "
43+ : aria-label =" ariaLabel "
4344 >
4445 <ul class =" fr-pagination__list" >
4546 <li >
You can’t perform that action at this time.
0 commit comments