Commit 5d6cbfc
committed
Bug 1848909: Add a11y support for XUL toolbarbuttons labelled by a text leaf. r=eeejay
Normally, XUL toolbarbutton elements are labelled using the label attribute or a child label element.
However, there are some instances such as in the Synced Tabs menu where a toolbarbutton contains only a text leaf.
Previously, these buttons exposed no label to accessibility APIs.
To fix this, we now allow a text leaf child in the accessibility tree.
We already supported this for XUL button elements.
Also, there was a bunch of existing common code in IsAcceptableChild for XULToolbarbuttonAccessible and XULButtonAccessible and the former subclasses the latter.
Therefore, XULToolbarbuttonAccessible::IsAcceptableChild has been refactored to call the base class method, adding an additional check specific to toolbarbuttons.
Differential Revision: https://phabricator.services.mozilla.com/D1917131 parent 8fe0f11 commit 5d6cbfc
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| 307 | + | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
415 | 413 | | |
416 | 414 | | |
417 | 415 | | |
| |||
0 commit comments