From 8aa47ac01f9959b9d47ac24dcd2fd8c88c9279f7 Mon Sep 17 00:00:00 2001 From: Manuel Matuzovic Date: Thu, 3 Oct 2024 22:01:37 +0200 Subject: [PATCH] fix(aria-allowed-role): add form to allowed roles of form element (#4588) 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. --- lib/standards/html-elms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/standards/html-elms.js b/lib/standards/html-elms.js index d96ab34b5e..46f07815ad 100644 --- a/lib/standards/html-elms.js +++ b/lib/standards/html-elms.js @@ -261,7 +261,7 @@ const htmlElms = { }, form: { contentTypes: ['flow'], - allowedRoles: ['search', 'none', 'presentation'] + allowedRoles: ['form', 'search', 'none', 'presentation'] }, h1: { contentTypes: ['heading', 'flow'],