Bug 1529407: Correct MSAA accValue and accRole for role="document". r=MarcoZ

1. When role="document" is (redundantly) used on the body element, still expose the URL via accValue, just like we do for role="application".
2. Expose ROLE_SYSTEM_DOCUMENT for role="document" (rather than the string "document") as per the spec. (Chrome already does this, so I don't expect backwards compat problems with clients.)

Differential Revision: https://phabricator.services.mozilla.com/D20582

--HG--
extra : moz-landing-system : lando
This commit is contained in:
James Teh 2019-02-21 06:48:02 +00:00
Родитель 191967c019
Коммит 8f27acc472
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -958,7 +958,7 @@ ROLE(NON_NATIVE_DOCUMENT,
"non-native document",
ATK_ROLE_DOCUMENT_FRAME,
NSAccessibilityGroupRole,
USE_ROLE_STRING,
ROLE_SYSTEM_DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
java::SessionAccessibility::CLASSNAME_VIEW,
eNoNameRule)

Просмотреть файл

@ -77,7 +77,8 @@ DocAccessibleWrap::get_accValue(VARIANT aVarChild, BSTR __RPC_FAR* aValue) {
// If document is being used to create a widget, don't use the URL hack
roles::Role role = Role();
if (role != roles::DOCUMENT && role != roles::APPLICATION &&
role != roles::DIALOG && role != roles::ALERT)
role != roles::DIALOG && role != roles::ALERT &&
role != roles::NON_NATIVE_DOCUMENT)
return hr;
nsAutoString url;