implicit-html-roles input
mappings are inconsistent with html-aria
#4672
Labels
ungroomed
Ticket needs a maintainer to prioritize and label
Product
axe-core
Product Version
4.10.2
Latest Version
Issue Description
implicit-html-roles.js today only has a partial understanding of the ARIA in HTML input element mappings.
As of ARIA in HTML 20241223 and axe-core 4.10.2, the cases look like this:
The logic axe-core uses vs the logic the spec uses for determining when text/tel/url/email/search should be treated as comboboxes is also slightly different; the spec says that the presence of a
list
attribute is enough that it should be treated as combobox-like, but axe-core demands that it not just have a list attribute but that the list attribute be a valididrefs
-style reference to adatalist
element (html-elms.js
is inconsistent withimplicit-html-roles.js
and just looks for any list attribute)Some of these cases (eg,
hidden
being treated as a textbox) almost certainly need correcting. For most of these (including thelist
difference), we'll want to do compatibility testing and double check that the spec'd role mappings match what UAs are actually using in practice, but should update to match the spec'd mappings if possible.As part of fixing this we'll want to audit for rules that target input elements that might be relying on the old behavior and double check that they aren't relying on the old behavior, there will probably be a few rules that will need new test cases for stuff like
file
inputs. We'll want to be especially careful to check on cases that look for stuff withwidget
role types; that determination will change for<input type="hidden">
It'd also be a good idea to also audit the set of allowed role/attributes in
html-elms.js
while we're here. For example, it looks like the spec is more permissive than axe-core about which rolestype=image
is allowed to use.Expectation
axe-core's implicit role calculation should match html-aria spec (or should document why in comments if there are specific UA-compat cases that require divergence)
Actual
Table above is not all ✅
How to Reproduce
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: