зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1455511: Always prune the accessibility tree for sliders. r=surkov
It doesn't make sense for a slider to have descendants and this confuses NVDA. MozReview-Commit-ID: 2A3gqTSu38g --HG-- extra : rebase_source : 8776da7b23601eb3f1ec9e9711f9f9cd9eedd849
This commit is contained in:
Родитель
cc7fecadc3
Коммит
fc5fc8afb1
|
@ -436,21 +436,27 @@ nsAccUtils::MustPrune(Accessible* aAccessible)
|
|||
{
|
||||
roles::Role role = aAccessible->Role();
|
||||
|
||||
// Don't prune the tree for certain roles if the tree is more complex than
|
||||
// a single text leaf.
|
||||
return
|
||||
(role == roles::MENUITEM ||
|
||||
role == roles::COMBOBOX_OPTION ||
|
||||
role == roles::OPTION ||
|
||||
role == roles::ENTRY ||
|
||||
role == roles::FLAT_EQUATION ||
|
||||
role == roles::PASSWORD_TEXT ||
|
||||
role == roles::PUSHBUTTON ||
|
||||
role == roles::TOGGLE_BUTTON ||
|
||||
role == roles::GRAPHIC ||
|
||||
role == roles::SLIDER ||
|
||||
role == roles::PROGRESSBAR ||
|
||||
role == roles::SEPARATOR) &&
|
||||
aAccessible->ContentChildCount() == 1 &&
|
||||
aAccessible->ContentChildAt(0)->IsTextLeaf();
|
||||
// Always prune the tree for sliders, as it doesn't make sense for a slider
|
||||
// to have descendants and this confuses NVDA.
|
||||
role == roles::SLIDER ||
|
||||
// Don't prune the tree for certain roles if the tree is more complex than
|
||||
// a single text leaf.
|
||||
(
|
||||
(
|
||||
role == roles::MENUITEM ||
|
||||
role == roles::COMBOBOX_OPTION ||
|
||||
role == roles::OPTION ||
|
||||
role == roles::ENTRY ||
|
||||
role == roles::FLAT_EQUATION ||
|
||||
role == roles::PASSWORD_TEXT ||
|
||||
role == roles::PUSHBUTTON ||
|
||||
role == roles::TOGGLE_BUTTON ||
|
||||
role == roles::GRAPHIC ||
|
||||
role == roles::PROGRESSBAR ||
|
||||
role == roles::SEPARATOR
|
||||
) &&
|
||||
aAccessible->ContentChildCount() == 1 &&
|
||||
aAccessible->ContentChildAt(0)->IsTextLeaf()
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче