Bug 1682865: Map roles::EDITCOMBOBOX to mozTextAccessible r=eeejay

Differential Revision: https://phabricator.services.mozilla.com/D101407
This commit is contained in:
Morgan Reschenberg 2021-01-11 22:04:13 +00:00
parent 766bb234e7
commit c19d6d89b4
2 changed files with 13 additions and 0 deletions

View File

@ -326,6 +326,7 @@ Class a11y::GetTypeFromRole(roles::Role aRole) {
case roles::ENTRY:
case roles::CAPTION:
case roles::ACCEL_LABEL:
case roles::EDITCOMBOBOX:
case roles::PASSWORD_TEXT:
// normal textfield (static or editable)
return [mozTextAccessible class];

View File

@ -302,3 +302,15 @@ addAccessibleTask(
},
{ iframe: true }
);
// Test input that gets role::EDITCOMBOBOX
addAccessibleTask(`<input type="text" id="box">`, async (browser, accDoc) => {
const box = getNativeInterface(accDoc, "box");
const editableAncestor = box.getAttributeValue("AXEditableAncestor");
is(
editableAncestor.getAttributeValue("AXDOMIdentifier"),
"box",
"Editable ancestor is box itself"
);
await focusIntoInputAndType(accDoc, "box");
});