• Resolved John Russell

    (@laubsterboy)


    When I do an accessibility scan of my websites it’s flagging the <textarea> field that is injected by the Antispam Bee plugin as not having a <label>.

    Are there supposed to be two <textarea> elements or is the original supposed to be replaced by a new one?

    Is there anything that can be done about this? Such as in the ‘replace_comment_field_callback’ function in the antispam_bee.php file – could you add an aria-label="<same-as-the-md5-id>" attribute to the added <textarea> element?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter John Russell

    (@laubsterboy)

    I meant for the aria-label to actually just be aria-label="Comment" for it to be consistent with the default WordPress comment field label.

    The problem is with the comment_form and that it renders two <textarea> elements on my single posts and the one that’s added by Antispam Bee doesn’t have a proper label, for accessibility.

    https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0&showtechniques=131#info-and-relationships

    • This reply was modified 6 years, 8 months ago by John Russell.
    Plugin Contributor Torsten Landsiedel

    (@zodiac1978)

    Hi @laubsterboy

    The second one is our honeypot. It is hidden and if filled out it is triggering the spam detection. Therefore it does not need to be accessible.

    All the best
    Torsten

    Thread Starter John Russell

    (@laubsterboy)

    Hi @zodiac1978

    Thanks for your response. I didn’t know the purpose of the additional textarea, so thank you for clarifying.

    My initial concern was that even though it doesn’t need to be accessible there is nothing informing assistive technology of this. However, it’s not keyboard navigable, so that shouldn’t ever be an issue. I think for our purposes we will filter the output to add the aria-label attribute just so it doesn’t continue to get flagged as an accessibility issue.

    Thanks again and have a great day!
    John

    • This reply was modified 6 years, 7 months ago by John Russell.
    Plugin Contributor Torsten Landsiedel

    (@zodiac1978)

    Hi @laubsterboy,

    My initial concern was that even though it doesn’t need to be accessible there is nothing informing assistive technology of this.

    There is an aria-hidden="true" to inform assistive technology to ignore this honeypot. I am not an expert for accessibility. Can we do something to be better here?

    I think for our purposes we will filter the output to add the aria-label attribute just so it doesn’t continue to get flagged as an accessibility issue.

    If we can add something to prevent this to be flagged, I will happily add this in the next release. Of course, just if this does not conflict with hiding this textarea (as it is our honeypot and should’nt be accessible for anyone).

    You can see our code here:
    https://github.com/pluginkollektiv/antispam-bee/blob/e91ea009268516908d6d2242cb31be98aee1aa27/antispam_bee.php#L1210

    If you are familiar with Github, please add an issue and if possible an Pull Request.

    Thanks in advance!

    All the best,
    Torsten

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Comment Form Accessibility Issue’ is closed to new replies.