[wp-trac] [WordPress Trac] #47975: Prevent aria-describedby broken reference in `comment_form()`
WordPress Trac
noreply at wordpress.org
Sat Sep 7 03:54:28 UTC 2019
#47975: Prevent aria-describedby broken reference in `comment_form()`
--------------------------+--------------------------------------
Reporter: afercia | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility, template
--------------------------+--------------------------------------
Changes (by dinhtungdu):
* keywords: => has-patch
Comment:
I use regex to match the valid and non-empty `#email-notes`. The regex
information and testing can be found here:
https://regex101.com/r/VPv2tw/8/.
Is using regex overkill for this ticket?
The simpler version should be check for the presence of `id="email-notes"`
in the comment note, then the theme developers are responsible for keeping
the comment note valid.
Replying to [comment:5 joedolson]:
> Need to check for ‘email-notes’ within the description string. If
they’re not present, but the string is non-empty, add the id to the
wrapper and print the aria-describedby attribute.
I don't think we should add the wrapper if the string is non-empty,
because the comment note can contain other information than email
description.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47975#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list