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 #ifndef mozilla_a11y_HTMLLinkAccessible_h__
7 #define mozilla_a11y_HTMLLinkAccessible_h__
9 #include "HyperTextAccessibleWrap.h"
14 class HTMLLinkAccessible
: public HyperTextAccessibleWrap
{
16 HTMLLinkAccessible(nsIContent
* aContent
, DocAccessible
* aDoc
);
18 NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLinkAccessible
,
19 HyperTextAccessibleWrap
)
22 virtual void Value(nsString
& aValue
) const override
;
23 virtual a11y::role
NativeRole() const override
;
24 virtual uint64_t NativeState() const override
;
25 virtual uint64_t NativeLinkState() const override
;
26 virtual uint64_t NativeInteractiveState() const override
;
29 virtual uint8_t ActionCount() const override
;
30 virtual void ActionNameAt(uint8_t aIndex
, nsAString
& aName
) override
;
31 virtual bool DoAction(uint8_t aIndex
) const override
;
33 // HyperLinkAccessible
34 virtual bool IsLink() const override
;
35 virtual already_AddRefed
<nsIURI
> AnchorURIAt(
36 uint32_t aAnchorIndex
) const override
;
39 virtual ~HTMLLinkAccessible() {}
41 enum { eAction_Jump
= 0 };
44 * Returns true if the link has href attribute.
46 bool IsLinked() const;
50 } // namespace mozilla