Repository navigation
Give the last-post link a screen-reader label in every template - #218
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #215.
Problem
{{ VIEW_LATEST_POST }}is never assigned, so the last-post link's<span class="sr-only">rendered empty. #192 fixedstyles/all/template/recent_topics_body_topbottom.htmlonly. Seven templates still had it: theall/side, page and simple templates, and thepbtech,pbwow3andwe_clearblueones. 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'stitle. 7 files, 1 line each.Tests
tests/template/template_vars_test.phpreads every shipped.htmltemplate and fails if any referencesVIEW_LATEST_POST. It failed for exactly these 7 templates before the fix and passes for all 16 after.tests/tests.mdupdated. Unit suite: 89 tests, 0 failures, run locally. CI result to follow.Checked on the local board (guest, rendered HTML):
sr-only/ "Go to last post"/app.php/rtNo 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