Skip to content

Give repeated post links unique accessible names - #94

Closed
henriqueiamarino wants to merge 1 commit into
trunkfrom
fix/ambiguous-link-names
Closed

henriqueiamarino wants to merge 1 commit into
trunkfrom
fix/ambiguous-link-names

Conversation

@henriqueiamarino

Copy link
Copy Markdown
Contributor

Closes #47.

Both cases from @carolinan's accessibility-ready testing, fixed without touching the visible design:

  • Comments CTA: the ipsum/comments-cta binding now appends the post title as screen reader text — the accessible name becomes "Join the conversation on Post title" / "Be the first to comment on Post title", unique per post, with the visible label leading the name (safe for label-in-name).
  • Linked post dates: a render_block_core/post-date filter appends the post title as screen reader text inside the link whenever the block is set to link — one filter covers every date link in the theme (index, archive pack, Keep Reading, sidebar), so posts published on the same day no longer share a name.

Verified on a running index: 20 date links → 20 unique accessible names, both CTA states carrying their post title, no visual change.

The post-date case is ultimately the block's gap — it affects any theme that links dates — and may be worth raising upstream.

🤖 Generated with Claude Code

The comments call to action and linked post dates repeat for every post
in a loop with identical accessible names and different targets. The
binding now appends the post title as screen reader text, and a render
filter does the same inside linked post dates — every such link reads
uniquely while the visible design stays untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the [Area] Theme Functions Issues or PRs that touch functions.php. label Sep 23, 2026
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: henriqueiamarino <iamarinoh@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@henriqueiamarino

Copy link
Copy Markdown
Contributor Author

Closing in favor of #93, which implements the direction agreed in #54 — removing the redundant date links rather than labeling them. The comments-CTA screen-reader fix is covered there too.

@henriqueiamarino
henriqueiamarino deleted the fix/ambiguous-link-names branch September 23, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Theme Functions Issues or PRs that touch functions.php.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguous link texts found

1 participant