зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1639048 - Don't traverse into labels. r=Jamie
Labels are often used as primary click targets for related inputs. If they are styled to certain bounds, but contain overflowing text for a11y with a color of "transparent", the synthesized click will happen outside the bounds of the label. If we skip text leafs with "color: transparent", we will skip labels altogether. Instead, lets land on labels when traversing, and ignore its subtree. Differential Revision: https://phabricator.services.mozilla.com/D77898
This commit is contained in:
Родитель
e5f8c2d951
Коммит
3267d4f31f
|
@ -250,6 +250,13 @@ uint16_t TraversalRule::DefaultMatch(Accessible* aAccessible) {
|
|||
nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
|
||||
}
|
||||
break;
|
||||
case roles::LABEL:
|
||||
if (IsFlatSubtree(aAccessible)) {
|
||||
// Match if this is a label with text but no nested controls.
|
||||
return nsIAccessibleTraversalRule::FILTER_MATCH |
|
||||
nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
|
||||
}
|
||||
break;
|
||||
case roles::MENUITEM:
|
||||
case roles::LINK:
|
||||
case roles::PAGETAB:
|
||||
|
|
|
@ -48,7 +48,6 @@ whitespace = white space
|
|||
pagetablist = tab list
|
||||
canvas = canvas
|
||||
checkmenuitem = check menu item
|
||||
label = label
|
||||
passwordtext = password text
|
||||
radiomenuitem = radio menu item
|
||||
textcontainer = text container
|
||||
|
@ -275,7 +274,6 @@ whitespaceAbbr = white space
|
|||
pagetablistAbbr = tab list
|
||||
canvasAbbr = canvas
|
||||
checkmenuitemAbbr = check menu item
|
||||
labelAbbr = label
|
||||
passwordtextAbbr = passwdtxt
|
||||
radiomenuitemAbbr = radio menu item
|
||||
textcontainerAbbr = text container
|
||||
|
|
Загрузка…
Ссылка в новой задаче