Browse Source
* Don't include two windows in a11y tree. `AvnRootAccessibilityElement` has been removed and now `AvnWindow` handles the accessibility protocol itself, exposing its children via the `AvnView`. * Remove hack now that issue is fixed. * Fix build errors after merge.pull/16129/head
committed by
GitHub
12 changed files with 182 additions and 167 deletions
@ -0,0 +1,13 @@ |
|||||
|
#pragma once |
||||
|
#import <Cocoa/Cocoa.h> |
||||
|
#import "avalonia-native.h" |
||||
|
|
||||
|
// Defines the interface between AvnAutomationNode and objects which implement
|
||||
|
// NSAccessibility such as AvnAccessibilityElement or AvnWindow.
|
||||
|
@protocol AvnAccessibility <NSAccessibility> |
||||
|
@required |
||||
|
- (void) raiseChildrenChanged; |
||||
|
@optional |
||||
|
- (void) raiseFocusChanged; |
||||
|
- (void) raisePropertyChanged:(AvnAutomationProperty)property; |
||||
|
@end |
||||
@ -0,0 +1,18 @@ |
|||||
|
#pragma once |
||||
|
#include "avalonia-native.h" |
||||
|
#include "AvnAccessibility.h" |
||||
|
|
||||
|
// Defines a means for managed code to raise accessibility events.
|
||||
|
class AvnAutomationNode : public ComSingleObject<IAvnAutomationNode, &IID_IAvnAutomationNode> |
||||
|
{ |
||||
|
public: |
||||
|
FORWARD_IUNKNOWN() |
||||
|
AvnAutomationNode(id <AvnAccessibility> owner) { _owner = owner; } |
||||
|
AvnAccessibilityElement* GetOwner() { return _owner; } |
||||
|
virtual void Dispose() override { _owner = nil; } |
||||
|
virtual void ChildrenChanged () override { [_owner raiseChildrenChanged]; } |
||||
|
virtual void PropertyChanged (AvnAutomationProperty property) override { [_owner raisePropertyChanged:property]; } |
||||
|
virtual void FocusChanged () override { [_owner raiseFocusChanged]; } |
||||
|
private: |
||||
|
__strong id <AvnAccessibility> _owner; |
||||
|
}; |
||||
@ -1,12 +1,13 @@ |
|||||
#pragma once |
#pragma once |
||||
|
|
||||
#import <Cocoa/Cocoa.h> |
#import <Cocoa/Cocoa.h> |
||||
|
#include "AvnAccessibility.h" |
||||
NS_ASSUME_NONNULL_BEGIN |
NS_ASSUME_NONNULL_BEGIN |
||||
|
|
||||
class IAvnAutomationPeer; |
class IAvnAutomationPeer; |
||||
|
|
||||
@interface AvnAccessibilityElement : NSAccessibilityElement |
@interface AvnAccessibilityElement : NSAccessibilityElement <AvnAccessibility> |
||||
+ (AvnAccessibilityElement *) acquire:(IAvnAutomationPeer *) peer; |
+ (id _Nullable) acquire:(IAvnAutomationPeer *) peer; |
||||
@end |
@end |
||||
|
|
||||
NS_ASSUME_NONNULL_END |
NS_ASSUME_NONNULL_END |
||||
|
|||||
Loading…
Reference in new issue