1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "XULAlertAccessible.h"
8 #include "Accessible-inl.h"
12 using namespace mozilla::a11y
;
14 ////////////////////////////////////////////////////////////////////////////////
16 ////////////////////////////////////////////////////////////////////////////////
19 XULAlertAccessible(nsIContent
* aContent
, DocAccessible
* aDoc
) :
20 AccessibleWrap(aContent
, aDoc
)
22 mGenericTypes
|= eAlert
;
25 XULAlertAccessible::~XULAlertAccessible()
30 XULAlertAccessible::NativeRole() const
36 XULAlertAccessible::NativeState() const
38 return Accessible::NativeState() | states::ALERT
;
42 XULAlertAccessible::Name(nsString
& aName
) const
44 // Screen readers need to read contents of alert, not the accessible name.
45 // If we have both some screen readers will read the alert twice.
50 ////////////////////////////////////////////////////////////////////////////////
54 XULAlertAccessible::IsWidget() const
60 XULAlertAccessible::ContainerWidget() const