@@ -63,9 +63,10 @@ The pagination component provides props to handle most of the pagination use-cas
6363 render (< Example / > )
6464 ```
6565
66- You can set any ` totalPageNumber ` , the component can handle it easily. Furthermore, you can set
67- ` siblingCount ` , which indicates how many pages are visible on either side of the ` currentPage ` and the
68- ` boundaryCount ` , which indicates how many pages are visible in the beginning and end.
66+ You can set any ` totalPageNumber ` , the component can handle it easily.\
67+ Furthermore, you can set ` siblingCount ` , which indicates how many pages are visible on either side of the ` currentPage ` and the
68+ ` boundaryCount ` , which indicates how many pages are visible in the beginning and end.\
69+ Also, you can set ` screenReaderLabelPageButton ` to customize what a screenreader will announce when the button receives focus.
6970
7071- ``` js
7172 class Example extends React .Component {
@@ -87,6 +88,9 @@ You can set any `totalPageNumber`, the component can handle it easily. Furthermo
8788 onPageChange= {(nextPage ) => this .setState ({ currentPage: nextPage })}
8889 siblingCount= {3 }
8990 boundaryCount= {2 }
91+ screenReaderLabelPageButton= {(currentPage , totalPageNumber ) =>
92+ ` Page ${ currentPage} of ${ totalPageNumber} `
93+ }
9094 / >
9195 )
9296 }
@@ -110,6 +114,9 @@ You can set any `totalPageNumber`, the component can handle it easily. Furthermo
110114 onPageChange= {(nextPage ) => setCurrentPage (nextPage)}
111115 siblingCount= {3 }
112116 boundaryCount= {2 }
117+ screenReaderLabelPageButton= {(currentPage , totalPageNumber ) =>
118+ ` Page ${ currentPage} of ${ totalPageNumber} `
119+ }
113120 / >
114121 )
115122 }
@@ -531,6 +538,7 @@ type: embed
531538< Guidelines>
532539 < Figure recommendation= " a11y" title= " Accessibility" >
533540 < Figure .Item > Ensure page links and the next/ previous buttons are labeled correctly for screen readers< / Figure .Item >
541+ < Figure .Item > Use ` screenReaderLabelPageButton` or ` screenReaderLabelNumberInput` for better screenreader experience< / Figure .Item >
534542 < / Figure>
535543< / Guidelines>
536544```
0 commit comments