Bug 428479. Support ARIA role of math. r=marcoz, a=beltzner

This commit is contained in:
aaronleventhal@moonset.net 2008-04-11 12:53:19 -07:00
Родитель cc91e30271
Коммит e33d1690e6
7 изменённых файлов: 18 добавлений и 5 удалений

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

@ -44,7 +44,7 @@
* @note - When adding a new role, be sure to also add it to nsRoleMap.h for
* each platform.
*/
[scriptable, uuid(31685b85-36a3-448c-99ed-b034a198e303)]
[scriptable, uuid(8c0f68f8-164a-4078-a9ee-36a7d180f0e4)]
interface nsIAccessibleRole : nsISupports
{
/**
@ -392,7 +392,8 @@ interface nsIAccessibleRole : nsISupports
const unsigned long ROLE_ANIMATION = 54;
/**
* Represents a mathematical equation. It is used by MATHML.
* Represents a mathematical equation. It is used by MATHML, where there is a
* rich DOM subtree for an equation. Use ROLE_FLAT_EQUATION for <img role="math" alt="[TeX]"/>
*/
const unsigned long ROLE_EQUATION = 55;
@ -763,10 +764,15 @@ interface nsIAccessibleRole : nsISupports
*/
const unsigned long ROLE_LISTBOX = 119;
/**
* Represents a mathematical equation in the accessible name
*/
const unsigned long ROLE_FLAT_EQUATION = 120;
/**
* It's not role actually. This contanst is important to help ensure
* nsRoleMap's are synchronized.
*/
const unsigned long ROLE_LAST_ENTRY = 120;
const unsigned long ROLE_LAST_ENTRY = 121;
};

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

@ -166,6 +166,7 @@ static const PRUint32 atkRoleMap[] = {
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_OPTION 117
ATK_ROLE_LIST_ITEM, // nsIAccessibleRole::ROLE_RICH_OPTION 118
ATK_ROLE_LIST, // nsIAccessibleRole::ROLE_LISTBOX 119
ATK_ROLE_UNKNOWN, // nsIAccessibleRole::ROLE_FLAT_EQUATION 120
kROLE_ATK_LAST_ENTRY // nsIAccessibleRole::ROLE_LAST_ENTRY
};

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

@ -107,6 +107,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
{&nsAccessibilityAtoms::aria_checked, kBoolState, nsIAccessibleStates::STATE_CHECKED | nsIAccessibleStates::STATE_CHECKABLE},
{&nsAccessibilityAtoms::aria_checked, "mixed", nsIAccessibleStates::STATE_MIXED | nsIAccessibleStates::STATE_CHECKABLE},
{&nsAccessibilityAtoms::aria_checked, "false", nsIAccessibleStates::STATE_CHECKABLE}, kEndEntry},
{"math", nsIAccessibleRole::ROLE_FLAT_EQUATION, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menu", nsIAccessibleRole::ROLE_MENUPOPUP, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menubar", nsIAccessibleRole::ROLE_MENUBAR, eNameLabelOrTitle, eNoValue, kNoReqStates, kEndEntry},
{"menuitem", nsIAccessibleRole::ROLE_MENUITEM, eNameOkFromChildren, eNoValue, kNoReqStates,

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

@ -269,8 +269,8 @@ static const char kRoleNames[][20] = {
"image map", //ROLE_IMAGE_MAP
"listbox option", //ROLE_OPTION
"listbox rich option", //ROLE_RICH_OPTION
"listbox" //ROLE_LISTBOX
"listbox", //ROLE_LISTBOX
"flat equation" //ROLE_FLAT_EQUATION
};
/**

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

@ -3523,6 +3523,7 @@ PRBool nsAccessible::MustPrune(nsIAccessible *aAccessible)
role == nsIAccessibleRole::ROLE_COMBOBOX_OPTION ||
role == nsIAccessibleRole::ROLE_OPTION ||
role == nsIAccessibleRole::ROLE_ENTRY ||
role == nsIAccessibleRole::ROLE_FLAT_EQUATION ||
role == nsIAccessibleRole::ROLE_PASSWORD_TEXT ||
role == nsIAccessibleRole::ROLE_PUSHBUTTON ||
role == nsIAccessibleRole::ROLE_TOGGLE_BUTTON ||

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

@ -162,5 +162,6 @@ static const NSString* AXRoles [] = {
NSAccessibilityRowRole, // ROLE_OPTION
NSAccessibilityRowRole, // ROLE_RICH_OPTION
NSAccessibilityListRole, // ROLE_LISTBOX
NSAccessibilityUnknownRole, // ROLE_FLAT_EQUATION
@"ROLE_LAST_ENTRY" // ROLE_LAST_ENTRY. bogus role that will never be shown (just marks the end of this array)!
};

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

@ -434,6 +434,9 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
// nsIAccessibleRole::ROLE_LISTBOX
{ ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
// nsIAccessibleRole::ROLE_FLAT_EQUATION
{ ROLE_SYSTEM_EQUATION, ROLE_SYSTEM_EQUATION },
// nsIAccessibleRole::ROLE_LAST_ENTRY
{ ROLE_WINDOWS_LAST_ENTRY, ROLE_WINDOWS_LAST_ENTRY }
};