2012-06-02 15:30:29 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_a11y_HTMLElementAccessibles_h__
|
|
|
|
#define mozilla_a11y_HTMLElementAccessibles_h__
|
|
|
|
|
2012-06-04 16:32:29 +04:00
|
|
|
#include "BaseAccessibles.h"
|
2012-06-02 15:30:29 +04:00
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML hr element.
|
|
|
|
*/
|
2012-06-04 16:32:29 +04:00
|
|
|
class HTMLHRAccessible : public LeafAccessible
|
2012-06-02 15:30:29 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
LeafAccessible(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual a11y::role NativeRole() override;
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML br element.
|
|
|
|
*/
|
2012-06-04 16:32:29 +04:00
|
|
|
class HTMLBRAccessible : public LeafAccessible
|
2012-06-02 15:30:29 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2013-09-11 20:56:01 +04:00
|
|
|
LeafAccessible(aContent, aDoc)
|
|
|
|
{
|
|
|
|
mType = eHTMLBRType;
|
|
|
|
}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual a11y::role NativeRole() override;
|
|
|
|
virtual uint64_t NativeState() override;
|
2012-10-14 08:18:39 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual ENameValueFlag NativeName(nsString& aName) override;
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML label element.
|
|
|
|
*/
|
|
|
|
class HTMLLabelAccessible : public HyperTextAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
HyperTextAccessibleWrap(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual Relation RelationByType(RelationType aType) override;
|
2012-10-14 08:18:39 +04:00
|
|
|
|
2016-01-14 23:37:15 +03:00
|
|
|
// ActionAccessible
|
|
|
|
virtual uint8_t ActionCount() override;
|
|
|
|
virtual void ActionNameAt(uint8_t aIndex, nsAString& aName) override;
|
|
|
|
virtual bool DoAction(uint8_t aIndex) override;
|
|
|
|
|
2012-10-14 08:18:39 +04:00
|
|
|
protected:
|
2014-07-09 01:23:18 +04:00
|
|
|
virtual ~HTMLLabelAccessible() {}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual ENameValueFlag NativeName(nsString& aName) override;
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for HTML output element.
|
|
|
|
*/
|
|
|
|
class HTMLOutputAccessible : public HyperTextAccessibleWrap
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
2012-12-09 21:23:19 +04:00
|
|
|
HyperTextAccessibleWrap(aContent, aDoc) {}
|
2012-06-02 15:30:29 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// Accessible
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual Relation RelationByType(RelationType aType) override;
|
2014-07-09 01:23:18 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~HTMLOutputAccessible() {}
|
2012-06-02 15:30:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|