Support » Plugin: Contact Form 7 » Add role attribute

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi


    Why do you need to add “form” role to <form> element? Isn’t it redundant?

    No, it may seem so but is not. The role defines a WAI-ARIA landmark to screen readers for quicker jumps around a page. Note the attribute can also take on the “search” landmark to distinguish it from a generic form, and does not necessarily need to be within the <form> tag but could also be put in the surrounding <div> tag. All Contact Form 7 forms should have role=”form” built-in to be WAI-ARIA compliant, and you might also consider building in support for the aria-label or aria-labelledby attributes for situations where there are multiple forms on a single page since screen readers will announce this to distinguish them.

    See for reference.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add role attribute’ is closed to new replies.