Skip to content

Commit

Permalink
fix(aria-allowed-role): add form to allowed roles of form element (#4588
Browse files Browse the repository at this point in the history
)

The ARIA in HTML spec [allows a form element to have
role=form](https://www.w3.org/TR/html-aria/#allowed-aria-roles-states-and-properties#el-form),
but [axe does not allow
it](https://github.com/dequelabs/axe-core/blob/develop/lib/standards/html-elms.js#L264).
This PR adds form to the allowedRoles of form.
  • Loading branch information
matuzo authored Oct 3, 2024
1 parent 9673d21 commit 8aa47ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/standards/html-elms.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const htmlElms = {
},
form: {
contentTypes: ['flow'],
allowedRoles: ['search', 'none', 'presentation']
allowedRoles: ['form', 'search', 'none', 'presentation']
},
h1: {
contentTypes: ['heading', 'flow'],
Expand Down

0 comments on commit 8aa47ac

Please sign in to comment.