Skip to content

Commit

Permalink
DataViews: Make disabled pagination buttons focusable
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Nov 22, 2023
1 parent d7d680e commit f69a7cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/edit-site/src/components/dataviews/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function Pagination( {
onChangeView( { ...view, page: 1 } )
}
disabled={ view.page === 1 }
__experimentalIsFocusable
label={ __( 'First page' ) }
icon={ previous }
showTooltip
Expand All @@ -58,6 +59,7 @@ function Pagination( {
onChangeView( { ...view, page: view.page - 1 } )
}
disabled={ view.page === 1 }
__experimentalIsFocusable
label={ __( 'Previous page' ) }
icon={ chevronLeft }
showTooltip
Expand Down Expand Up @@ -115,6 +117,7 @@ function Pagination( {
onChangeView( { ...view, page: view.page + 1 } )
}
disabled={ view.page >= totalPages }
__experimentalIsFocusable
label={ __( 'Next page' ) }
icon={ chevronRight }
showTooltip
Expand All @@ -125,6 +128,7 @@ function Pagination( {
onChangeView( { ...view, page: totalPages } )
}
disabled={ view.page >= totalPages }
__experimentalIsFocusable
label={ __( 'Last page' ) }
icon={ next }
showTooltip
Expand Down

0 comments on commit f69a7cd

Please sign in to comment.