[wp-trac] [WordPress Trac] #59965: Reply link: Elements with visible text labels do not have matching accessible names (was: Reply link: Elements with visible text labels do not have matching accessible na)
WordPress Trac
noreply at wordpress.org
Sun Nov 26 08:33:38 UTC 2023
#59965: Reply link: Elements with visible text labels do not have matching
accessible names
--------------------------+--------------------------------------
Reporter: halilesen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 6.4
Severity: normal | Resolution:
Keywords: | Focuses: accessibility, template
--------------------------+--------------------------------------
Changes (by sabernhardt):
* focuses: template, coding-standards => accessibility, template
Comment:
Hi and thanks for the report!
The `aria-label` was added to avoid having the same accessible name for
all the Reply links in #16433 / [29822].
PageSpeed Insights gave an [https://dequeuniversity.com/rules/axe/4.7
/label-content-name-mismatch error] because it did not find "Yanıtla" as
//part of// the `aria-label`.
`<a rel='nofollow' class='comment-reply-link' href='#comment-112' data-
commentid="112" data-postid="210" data-belowelement="comment-112" data-
respondelement="respond" data-replyto="Cevap Halil ESEN" aria-label='Cevap
Halil ESEN'>Yanıtla</a>`
It also seems that your site (either the theme or a plugin) overrides
WordPress's default
[https://translate.wordpress.org/projects/wp/dev/tr/default/?filters%5Bterm%5D=Reply&filters%5Bcase_sensitive%5D=yes
Turkish translation] for the visible "Reply" text. "Cevapla" still could
fail the automated test with an `aria-label` of "Cevap [commenter's
name]", but it probably would sound close enough to recognize which link
it is when seeing the text and hearing the label.
If you like using the commenter's name inside the //visible// text instead
of a label, maybe the `get_comment_reply_link()` function could add a
condition to use `reply_to_text` there and remove the label.
Additional notes:
- The function docblock does not include `reply_to_text` yet.
- I would like the quotes to be consistent (all double) within the same
tag.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59965#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list