зеркало из 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,10 +436,15 @@ nsAccUtils::MustPrune(Accessible* aAccessible)
|
||||||
{
|
{
|
||||||
roles::Role role = aAccessible->Role();
|
roles::Role role = aAccessible->Role();
|
||||||
|
|
||||||
|
return
|
||||||
|
// 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
|
// Don't prune the tree for certain roles if the tree is more complex than
|
||||||
// a single text leaf.
|
// a single text leaf.
|
||||||
return
|
(
|
||||||
(role == roles::MENUITEM ||
|
(
|
||||||
|
role == roles::MENUITEM ||
|
||||||
role == roles::COMBOBOX_OPTION ||
|
role == roles::COMBOBOX_OPTION ||
|
||||||
role == roles::OPTION ||
|
role == roles::OPTION ||
|
||||||
role == roles::ENTRY ||
|
role == roles::ENTRY ||
|
||||||
|
@ -448,9 +453,10 @@ nsAccUtils::MustPrune(Accessible* aAccessible)
|
||||||
role == roles::PUSHBUTTON ||
|
role == roles::PUSHBUTTON ||
|
||||||
role == roles::TOGGLE_BUTTON ||
|
role == roles::TOGGLE_BUTTON ||
|
||||||
role == roles::GRAPHIC ||
|
role == roles::GRAPHIC ||
|
||||||
role == roles::SLIDER ||
|
|
||||||
role == roles::PROGRESSBAR ||
|
role == roles::PROGRESSBAR ||
|
||||||
role == roles::SEPARATOR) &&
|
role == roles::SEPARATOR
|
||||||
|
) &&
|
||||||
aAccessible->ContentChildCount() == 1 &&
|
aAccessible->ContentChildCount() == 1 &&
|
||||||
aAccessible->ContentChildAt(0)->IsTextLeaf();
|
aAccessible->ContentChildAt(0)->IsTextLeaf()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче