Bug 370276. Expose buttons with popup as ROLE_SYSTEM_BUTTONMENU. r=david.bolter

This commit is contained in:
aaronleventhal%moonset.net 2007-02-14 16:48:39 +00:00
Родитель 1c35114d59
Коммит 55b362c337
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -469,6 +469,12 @@ STDMETHODIMP nsAccessibleWrap::get_accRole(
NS_ASSERTION(msaaRoleMap[nsIAccessible::ROLE_LAST_ENTRY] == ROLE_MSAA_LAST_ENTRY,
"MSAA role map skewed");
// Special case, not a great place for this, but it's better than adding extra role buttonmenu role to ARIA
// Other APIs do not have a special role for this.
// Really the HASPOPUP state should have been enough for MSAA, but this avoids asking vendors for a fix.
if (msaaRole == ROLE_SYSTEM_PUSHBUTTON && (State(xpAccessible) & STATE_HASPOPUP)) {
msaaRole = ROLE_SYSTEM_BUTTONMENU;
}
// -- Try enumerated role
if (msaaRole != USE_ROLE_STRING) {
pvarRole->vt = VT_I4;