• Hi Joe,

    I am using the wpforms plugin on my site and apparently it does not allow me to add aria-labelledby attributes. However I see by enabling the setting on your WP-Accessibility plugin, it is displaying ‘aria-required=”true”. Is there a way to add those custom attributes through your plugin?

    Thanks,
    Jay

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Adding an aria-labelledby attribute would require WP Accessibility to be able to identify that a given piece of unassociated content was intended as labelling information for a field, which isn’t something it’s possible to do. (If it was, screen readers would already be doing that!)

    What is the context in which you want to use aria-labelledby in a form? The reasonable occasions for that to be used in a form are pretty limited.

    Thread Starter jwebadgility

    (@jwebadgility)

    Hi Joe,

    I’m using WPforms and I’m getting errors in my WAVE tool that say:
    Errors Multiple form labels
    What It Means

    A form control has more than one label associated with it.
    Why It Matters
    A form control should have at most one associated label element. If more than one label element is associated to the control, assistive technology may not read the appropriate label.

    It doesn’t appear that wpforms allows me to add any additional aria tags (my thought is aria tags would resolve those errors). Am I incorrect?

    Thanks,
    Jay

    Plugin Author Joe Dolson

    (@joedolson)

    No, ARIA attributes won’t resolve those errors. They *might* clarify what the lable is intended to be for a given field, but they won’t resolve the fact that the field has more than one label assigned, and that assistive technology will have to choose how to read the information for the field, since the duplication makes it ambiguous.

    Better would be to change the HTML so that only one label is used.

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

The topic ‘WPforms and aria labels’ is closed to new replies.