Skip to content

Commit

Permalink
Bug 1149118 - Expose radio group with the correct role on OS X, r=surkov
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zehe committed Mar 30, 2015
1 parent 5c0ea2c commit 0e6a7ab
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion accessible/base/ARIAMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ static nsRoleMapEntry sWAIRoleMaps[] =
},
{ // radiogroup
&nsGkAtoms::radiogroup,
roles::GROUPING,
roles::RADIO_GROUP,
kUseMapRole,
eNoValue,
eNoAction,
Expand Down
7 changes: 6 additions & 1 deletion accessible/base/Role.h
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,12 @@ enum Role {
*/
MATHML_STACK_LINE = 167,

LAST_ROLE = MATHML_STACK_LINE
/**
* A group containing radio buttons
*/
RADIO_GROUP = 168,

LAST_ROLE = RADIO_GROUP
};

} // namespace role
Expand Down
8 changes: 8 additions & 0 deletions accessible/base/RoleMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1359,3 +1359,11 @@ ROLE(MATHML_STACK_LINE,
0,
IA2_ROLE_UNKNOWN,
eNoNameRule)

ROLE(RADIO_GROUP,
"grouping",
ATK_ROLE_PANEL,
NSAccessibilityRadioGroupRole,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
eNoNameRule)
7 changes: 6 additions & 1 deletion accessible/interfaces/nsIAccessibleRole.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Defines cross platform (Gecko) roles.
*/
[scriptable, uuid(55581ec3-ba6e-4805-8108-260ed34cdcbb)]
[scriptable, uuid(00f9e831-3198-40b7-9186-5251474d4d7a)]
interface nsIAccessibleRole : nsISupports
{
/**
Expand Down Expand Up @@ -969,4 +969,9 @@ interface nsIAccessibleRole : nsISupports
* A MathML line in a stack (msline in MathML).
*/
const unsigned long ROLE_MATHML_STACK_LINE = 167;

/**
* A group containing radio buttons
*/
const unsigned long ROLE_RADIO_GROUP = 168;
};
1 change: 1 addition & 0 deletions accessible/tests/mochitest/role.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const ROLE_PROGRESSBAR = nsIAccessibleRole.ROLE_PROGRESSBAR;
const ROLE_PROPERTYPAGE = nsIAccessibleRole.ROLE_PROPERTYPAGE;
const ROLE_PUSHBUTTON = nsIAccessibleRole.ROLE_PUSHBUTTON;
const ROLE_RADIOBUTTON = nsIAccessibleRole.ROLE_RADIOBUTTON;
const ROLE_RADIO_GROUP = nsIAccessibleRole.ROLE_RADIO_GROUP;
const ROLE_RADIO_MENU_ITEM = nsIAccessibleRole.ROLE_RADIO_MENU_ITEM;
const ROLE_RICH_OPTION = nsIAccessibleRole.ROLE_RICH_OPTION;
const ROLE_ROW = nsIAccessibleRole.ROLE_ROW;
Expand Down
2 changes: 1 addition & 1 deletion accessible/tests/mochitest/role/test_aria.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
testRole("aria_presentation", ROLE_TEXT_CONTAINER); // weak role
testRole("aria_progressbar", ROLE_PROGRESSBAR);
testRole("aria_radio", ROLE_RADIOBUTTON);
testRole("aria_radiogroup", ROLE_GROUPING);
testRole("aria_radiogroup", ROLE_RADIO_GROUP);
testRole("aria_region", ROLE_PANE);
testRole("aria_row", ROLE_ROW);
testRole("aria_rowheader", ROLE_ROWHEADER);
Expand Down
2 changes: 1 addition & 1 deletion accessible/tests/mochitest/tree/test_formctrl.xul
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// radiogroup
accTree = {
role: ROLE_GROUPING,
role: ROLE_RADIO_GROUP,
children: [
{
role: ROLE_RADIOBUTTON,
Expand Down
2 changes: 1 addition & 1 deletion accessible/xul/XULFormControlAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ XULRadioGroupAccessible::
role
XULRadioGroupAccessible::NativeRole()
{
return roles::GROUPING;
return roles::RADIO_GROUP;
}

uint64_t
Expand Down

0 comments on commit 0e6a7ab

Please sign in to comment.