Bug 1409084: Map inputs with a list attribute to role EDITCOMBOBOX. r=eeejay

Previously, we mapped these to ENTRY.
This is incorrect according to the HTML AAM spec and causes problems for JAWS.

Differential Revision: https://phabricator.services.mozilla.com/D76066
This commit is contained in:
James Teh 2020-05-20 23:58:22 +00:00
parent b50a39c2d3
commit be8c555522
2 changed files with 6 additions and 3 deletions

View File

@ -206,7 +206,10 @@ role HTMLTextFieldAccessible::NativeRole() const {
if (mType == eHTMLTextPasswordFieldType) {
return roles::PASSWORD_TEXT;
}
if (mContent->AsElement()->HasAttr(kNameSpaceID_None,
nsGkAtoms::list_)) {
return roles::EDITCOMBOBOX;
}
return roles::ENTRY;
}

View File

@ -87,7 +87,7 @@
// input@type="email", value
accTree = {
role: ROLE_ENTRY,
role: ROLE_EDITCOMBOBOX, // Because of list attribute
children: [
{ // text child
role: ROLE_TEXT_LEAF,
@ -100,7 +100,7 @@
// input@type="search", value
accTree = {
role: ROLE_ENTRY,
role: ROLE_EDITCOMBOBOX, // Because of list attribute
children: [
{ // text child
role: ROLE_TEXT_LEAF,