[wp-trac] [WordPress Trac] #55717: aria-hidden="true" attribute in comment template for visible text (required fields)

WordPress Trac noreply at wordpress.org
Sat May 14 10:19:23 UTC 2022

#55717: aria-hidden="true" attribute in comment template for visible text (required
 Reporter:  juliemoynat                |       Owner:  audrasjb
     Type:  defect (bug)               |      Status:  reviewing
 Priority:  normal                     |   Milestone:  6.1
Component:  Comments                   |     Version:  5.8
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch required-fields  |     Focuses:  accessibility

Comment (by juliemoynat):

 I’ve discussed about this subject with an accessibility expert friend,
 Romain Gervois, and he has an idea which is interesting.

 We could:

 - rephrase the "Required fields are marked *" sentence so that the symbol
 would be named clearly just like {{{Required field are preceded by an
 asterisk <span aria-hidden="true">*</span>.}}}
 - make the asterisk in the label an image with a clear label so that each
 screen reader will always read "asterisk": {{{<label for="stuff">Name of
 the field <span role="img" aria-label="asterisk">*</span></label>}}}
 - of course, the word "asterisk" **must** be the same translation string
 for the aria-label and for the sentence to prevent a different translation
 between both use of the word.

 Finally, I (and he too) don't think it's really a problem to have the
 symbol read in the label but if it's really a problem and we put the
 asterisk out of the label, we would need to have an HTML container for the
 label + the asterisk to be able to style these elements correctly in CSS.

 What do you think?

Ticket URL: <https://core.trac.wordpress.org/ticket/55717#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list