зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1676509 - Remove AXTitle from list item groups. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D96632
This commit is contained in:
Родитель
cf73c1aba7
Коммит
eb929d7c1e
|
@ -325,6 +325,9 @@ Class a11y::GetTypeFromRole(roles::Role aRole) {
|
|||
case roles::LISTBOX:
|
||||
return [mozListboxAccessible class];
|
||||
|
||||
case roles::LISTITEM:
|
||||
return [MOXListItemAccessible class];
|
||||
|
||||
case roles::OPTION: {
|
||||
return [mozOptionAccessible class];
|
||||
}
|
||||
|
|
|
@ -39,3 +39,10 @@
|
|||
- (NSNumber*)moxExpanded;
|
||||
|
||||
@end
|
||||
|
||||
@interface MOXListItemAccessible : mozAccessible
|
||||
|
||||
// override
|
||||
- (NSString*)moxTitle;
|
||||
|
||||
@end
|
||||
|
|
|
@ -87,3 +87,11 @@ using namespace mozilla::a11y;
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MOXListItemAccessible
|
||||
|
||||
- (NSString*)moxTitle {
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -43,3 +43,18 @@ addAccessibleTask(
|
|||
is(fieldset.getAttributeValue("AXDescription"), "Fields");
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Test to see that list items don't get titled groups
|
||||
*/
|
||||
addAccessibleTask(
|
||||
`<ul style="list-style: none;"><li id="unstyled-item">Hello</li></ul>
|
||||
<ul><li id="styled-item">World</li></ul>`,
|
||||
(browser, accDoc) => {
|
||||
let unstyledItem = getNativeInterface(accDoc, "unstyled-item");
|
||||
is(unstyledItem.getAttributeValue("AXTitle"), "");
|
||||
|
||||
let styledItem = getNativeInterface(accDoc, "unstyled-item");
|
||||
is(styledItem.getAttributeValue("AXTitle"), "");
|
||||
}
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче