mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1625184 - Map dialogs and alert dialogs correctly in Mac. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D74957
This commit is contained in:
parent
208d1c7443
commit
c1c0b3551c
@ -182,7 +182,7 @@ ROLE(CHART,
|
||||
ROLE(DIALOG,
|
||||
"dialog",
|
||||
ATK_ROLE_DIALOG,
|
||||
NSAccessibilityWindowRole, //There's a dialog subrole.
|
||||
NSAccessibilityGroupRole, //There's a dialog subrole.
|
||||
ROLE_SYSTEM_DIALOG,
|
||||
ROLE_SYSTEM_DIALOG,
|
||||
java::SessionAccessibility::CLASSNAME_DIALOG,
|
||||
|
@ -1139,6 +1139,7 @@ struct RoleDescrMap {
|
||||
static const RoleDescrMap sRoleDescrMap[] = {
|
||||
{@"AXApplicationAlert", NS_LITERAL_STRING("alert")},
|
||||
{@"AXApplicationAlertDialog", NS_LITERAL_STRING("alertDialog")},
|
||||
{@"AXApplicationDialog", NS_LITERAL_STRING("dialog")},
|
||||
{@"AXApplicationLog", NS_LITERAL_STRING("log")},
|
||||
{@"AXApplicationMarquee", NS_LITERAL_STRING("marquee")},
|
||||
{@"AXApplicationStatus", NS_LITERAL_STRING("status")},
|
||||
|
@ -14,7 +14,7 @@ loadScripts(
|
||||
/**
|
||||
* Test different HTML elements for their roles and subroles
|
||||
*/
|
||||
function testRoleAndSubRole(accDoc, id, axRole, axSubRole) {
|
||||
function testRoleAndSubRole(accDoc, id, axRole, axSubRole, axRoleDescription) {
|
||||
let el = getNativeInterface(accDoc, id);
|
||||
if (axRole) {
|
||||
is(
|
||||
@ -30,6 +30,13 @@ function testRoleAndSubRole(accDoc, id, axRole, axSubRole) {
|
||||
"Subrole for " + id + " is " + axSubRole
|
||||
);
|
||||
}
|
||||
if (axRoleDescription) {
|
||||
is(
|
||||
el.getAttributeValue("AXRoleDescription"),
|
||||
axRoleDescription,
|
||||
"Subrole for " + id + " is " + axRoleDescription
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
addAccessibleTask(
|
||||
@ -105,10 +112,16 @@ addAccessibleTask(
|
||||
|
||||
// ARIA widget roles
|
||||
testRoleAndSubRole(accDoc, "alert", null, "AXApplicationAlert");
|
||||
testRoleAndSubRole(accDoc, "alertdialog", null, "AXApplicationAlertDialog");
|
||||
testRoleAndSubRole(
|
||||
accDoc,
|
||||
"alertdialog",
|
||||
"AXGroup",
|
||||
"AXApplicationAlertDialog",
|
||||
"alert dialog"
|
||||
);
|
||||
testRoleAndSubRole(accDoc, "article", null, "AXDocumentArticle");
|
||||
testRoleAndSubRole(accDoc, "code", "AXGroup", "AXCodeStyleGroup");
|
||||
testRoleAndSubRole(accDoc, "dialog", null, "AXApplicationDialog");
|
||||
testRoleAndSubRole(accDoc, "dialog", null, "AXApplicationDialog", "dialog");
|
||||
testRoleAndSubRole(accDoc, "ariaDocument", null, "AXDocument");
|
||||
testRoleAndSubRole(accDoc, "log", null, "AXApplicationLog");
|
||||
testRoleAndSubRole(accDoc, "marquee", null, "AXApplicationMarquee");
|
||||
|
@ -38,6 +38,7 @@ main = main
|
||||
# The (spoken) role description for various WAI-ARIA roles
|
||||
alert = alert
|
||||
alertDialog = alert dialog
|
||||
dialog = dialog
|
||||
article = article
|
||||
document = document
|
||||
# The (spoken) role description for the WAI-ARIA figure role
|
||||
|
Loading…
Reference in New Issue
Block a user