File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
darwin/macos/framework/Source Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class AccessibilityBridge
100100 virtual std::shared_ptr<FlutterPlatformNodeDelegate>
101101 CreateFlutterPlatformNodeDelegate () = 0 ;
102102 };
103+
103104 // -----------------------------------------------------------------------------
104105 // / @brief Creates a new instance of a accessibility bridge.
105106 // /
@@ -110,6 +111,11 @@ class AccessibilityBridge
110111 std::unique_ptr<AccessibilityBridgeDelegate> delegate);
111112 ~AccessibilityBridge ();
112113
114+ // -----------------------------------------------------------------------------
115+ // / @brief The ID of the root node in the accessibility tree. In Flutter,
116+ // this is always 0.
117+ static constexpr int32_t kRootNodeId = 0 ;
118+
113119 // ------------------------------------------------------------------------------
114120 // / @brief Adds a semantics node update to the pending semantics update.
115121 // / Calling this method alone will NOT update the semantics tree.
Original file line number Diff line number Diff line change 1212
1313namespace flutter {
1414
15- inline constexpr int32_t kRootNode = 0 ;
16-
1715// Native mac notifications fired. These notifications are not publicly documented.
1816static NSString * const AccessibilityLoadCompleteNotification = @" AXLoadComplete" ;
1917static NSString * const AccessibilityInvalidStatusChangedNotification = @" AXInvalidStatusChanged" ;
187185 if (ax_node.data ().HasState (ax::mojom::State::kEditable )) {
188186 events.push_back ({
189187 .name = NSAccessibilityValueChangedNotification ,
190- .target = bridge->GetFlutterPlatformNodeDelegateFromID (kRootNode )
191- .lock ()
192- ->GetNativeViewAccessible (),
188+ .target =
189+ bridge->GetFlutterPlatformNodeDelegateFromID (AccessibilityBridge::kRootNodeId )
190+ .lock ()
191+ ->GetNativeViewAccessible (),
193192 .user_info = nil ,
194193 });
195194 }
You can’t perform that action at this time.
0 commit comments