Update implicit role calculations in ARIAMapper #574
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates data and code in
ARIAMapper.elemToRoleMap/inputToRoleMap
to match the
implicitRole
data inARIADefinitions.documentConformanceRequirement/documentConformanceRequirementSpecialTags
and the code in
RPTUtil.getElementAriaProperty
, which is called byRPTUtil.getImplicitRole
.The
ARIADefinitions
data andRPTUtil
code were originally updated in #414 to match https://www.w3.org/TR/html-aria/ (which moved to W3C Rec status last week!) But the ARIAMapper data/code were not updated at that time.It is unfortunate that this data and logic for
implicitRole
is duplicated because that makes it harder to maintain, so I have opened #573 to remove the redundancy some day.Here are the changes that were needed in ARIAMapper:
menuitem
element from all places it was refenced, because:a) it has not been supported in any browser for a long time (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menuitem#browser_compatibility),
b)
menu
element's role was changed to "list", which is not compatible with having children with role "menuitem"input type="search"
doesn't have a list, its implicit role is "searchbox", not "textbox"input type="password"
does not have an implicit role (it is allowed to have attributes that are allowed on textbox - I will be adding a new machanism to cover that)body
no longer has "document" role (it now has no implicit role). Instead, thehtml
element has "document" role.dfn
has role "term"dt
has role "term"fieldset
has role "group"figure
has role "figure"footer
: applied the same changes toheader
from Header bug: Failure if header parent is not an element (shadow dom?) #431form
only has implicit role "form" (landmark) if it has an accessible namemeter
no longer has implicit "progressbar" role (Default role for meter should not be progressbar w3c/html-aria#44)section
only has implicit role "region" (landmark) if it has an accessible nameselect
implicit role calculation because parseInt("") returns NaNsummary
has implicit role "button"svg
has implicit role "graphics-document"textarea
to alphabetical ordertd