зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1738070: Don't fire state change a11y events for NS_EVENT_STATE_DEFAULT changes on things other than buttons. r=morgan
We only expose this state on HTMLButtonAccessible, but we sometimes get these notifications for other controls; e.g. checkbox inputs. We shouldn't fire a state change event for a state we never expose. Differential Revision: https://phabricator.services.mozilla.com/D129673
This commit is contained in:
Родитель
9c788583c9
Коммит
9e4079f57f
|
@ -880,7 +880,9 @@ void DocAccessible::ContentStateChanged(dom::Document* aDocument,
|
|||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_DEFAULT)) {
|
||||
// We only expose NS_EVENT_STATE_DEFAULT on buttons, but we can get
|
||||
// notifications for other controls like checkboxes.
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_DEFAULT) && accessible->IsButton()) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(accessible, states::DEFAULT);
|
||||
FireDelayedEvent(event);
|
||||
|
|
Загрузка…
Ссылка в новой задаче