Customise link text in paginate_links() and paginate_comments_links() for accessibility
|Reported by:||grahamarmfield||Owned by:|
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 (18)
comment:11 in reply to: ↑ 10 grahamarmfield — 3 months ago
comment:12 nacin — 6 weeks ago
- Component changed from Accessibility to Template
- Focuses accessibility added