-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option ['role' => 'form'] is not necessary for Form::create() #394
Comments
ADmad
added a commit
that referenced
this issue
Oct 21, 2023
Fixes #394 - Removes role="form" from form tags.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What you did
Create a form by using
FormHelper::create()
. This results in a form tag<form ... role='form'> ... </form>
as the methodFormHelper::create()
uses the default option'role' => 'form'
to create form tags (see line 409)Expected Behavior
No 'role' attribute in form tags, as 'role' is not necessary. According to MDN web docs, [...] The HTML
<form>
element is sufficient to tell assistive technologies that there is a form. [...].Actual Behavior
For forms created this way, the PageSpeed Insights raise a warning as follows:
I would suggest to remove the default value of the
role
attribute of line 409 to get a valid html document.The text was updated successfully, but these errors were encountered: