Skip to content

Give the last-post link a screen-reader label in every template - #218

Merged
avandenberghe merged 1 commit into
develop33from
issue-215-sr-only-last-post
Oct 4, 2026
Merged

avandenberghe merged 1 commit into
develop33from
issue-215-sr-only-last-post

Conversation

@avandenberghe

Copy link
Copy Markdown
Collaborator

Closes #215.

Problem
{{ VIEW_LATEST_POST }} is never assigned, so the last-post link's <span class="sr-only"> rendered empty. #192 fixed styles/all/template/recent_topics_body_topbottom.html only. Seven templates still had it: the all/ side, page and simple templates, and the pbtech, pbwow3 and we_clearblue ones. This was raised in the customisations team's 3.0.11 review.

Fix
Use {{ lang('GOTO_LAST_POST') }} in all seven, as #192 did. It matches the link's title. 7 files, 1 line each.

Tests

  • New tests/template/template_vars_test.php reads every shipped .html template and fails if any references VIEW_LATEST_POST. It failed for exactly these 7 templates before the fix and passes for all 16 after.
  • tests/tests.md updated. Unit suite: 89 tests, 0 failures, run locally. CI result to follow.

Checked on the local board (guest, rendered HTML):

Page before: empty sr-only / "Go to last post" after
index (side column) 15 / 0 0 / 15
/app.php/rt 15 / 0 0 / 15
index, pbWoW3 style 15 / 0 0 / 15

No changelog entry or version bump, per this repo's convention. The 3.0.12 changelog line for #192 currently claims the label is fixed; that should point to this PR when the release notes are next updated.

🤖 Generated with Claude Code

VIEW_LATEST_POST is never assigned, so the last-post link's sr-only
label rendered empty. #192 fixed this in the all/ top-bottom template
only; the all/ side, page and simple templates and the pbtech, pbwow3
and we_clearblue ones still had it. Use lang('GOTO_LAST_POST'), as #192
did, matching the link's title.

A new template test fails if any shipped template references
VIEW_LATEST_POST again.

Closes #215

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avandenberghe
avandenberghe merged commit f3496b5 into develop33 Oct 4, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last-post link has an empty screen-reader label in 7 templates (VIEW_LATEST_POST is never assigned)

1 participant