Customise link text in paginate_links() and paginate_comments_links() for accessibility
|Reported by:||grahamarmfield||Owned by:||johnbillion|
paginate_links() produces a list of numbered pagination links in archive, search, etc. paginate_comments_links() does the same for paged comments.
Currently there appears to be no way of tailoring the link text to include context as well as the page number. A plain list of numbered links may not mean much for screen reader users who are using the screen reader's 'List Links' facility.
For example, I would like to add <span class="visuallyhidden">Page </span> before the page number to provide context for the links for users of screen readers. My stylesheet will hide the extra text from sighted users, but it will still be available to AT (assistive technology).
I suggest the addition of two new parameters: before_link and after_link for this purpose. The defaults for each parameter would be none.
Change History (26)
- Keywords has-patch needs-testing added; needs-patch removed
comment:11 in reply to: ↑ 10 @grahamarmfield — 20 months ago
comment:12 @nacin — 18 months ago
- Component changed from Accessibility to Template
- Focuses accessibility added
comment:15 follow-up: ↓ 16 @johnbillion — 17 months ago
- Component changed from General to Themes
- Keywords needs-docs added
- Milestone changed from Awaiting Review to Future Release
- Owner set to johnbillion
- Status changed from new to accepted
comment:17 @johnbillion — 17 months ago
- Resolution set to fixed
- Status changed from accepted to closed