2 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIAccessibility.h>
11 /* This protocol's primary use is so widget/cocoa can talk back to us
14 ChildView owns the topmost MUIRootAccessible, and needs to take care of
15 setting up that parent/child relationship.
17 This protocol is thus used to make sure it knows it's talking to us, and not
18 just some random |id|.
21 @protocol MUIRootAccessibleProtocol
<NSObject
>
23 - (BOOL
)hasRepresentedView
;
25 - (nullable id
)representedView
;
29 - (BOOL
)isAccessibilityElement
;
31 - (nullable NSString
*)accessibilityLabel
;
33 - (CGRect
)accessibilityFrame
;
35 - (nullable NSString
*)accessibilityValue
;
37 - (uint64_t)accessibilityTraits
;
39 // UIAccessibilityContainer
41 - (NSInteger
)accessibilityElementCount
;
43 - (nullable id
)accessibilityElementAtIndex
:(NSInteger
)index
;
45 - (NSInteger
)indexOfAccessibilityElement
:(nonnull id
)element
;
47 - (nullable NSArray
*)accessibilityElements
;
49 - (UIAccessibilityContainerType
)accessibilityContainerType
;