From d92c42f349e1799ee0d6ba4a4f834588f3d97abd Mon Sep 17 00:00:00 2001 From: Nolan Scobie Date: Sat, 3 Oct 2020 02:30:23 -0400 Subject: [PATCH] Minor a11y documentation breadcrumbs (#20330) Adds a reference to RenderObject.describeSemanticsClip to `SemanticsFlag.isHidden` and a hint that lets readers know that the `SemanticsNode` rect is specified in local coordinates. --- lib/ui/semantics.dart | 4 ++++ lib/ui/semantics/semantics_node.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart index 56e371eb7..30bce7cc9 100644 --- a/lib/ui/semantics.dart +++ b/lib/ui/semantics.dart @@ -479,6 +479,10 @@ class SemanticsFlag { /// the semantics tree altogether. Hidden elements are only included in the /// semantics tree to work around platform limitations and they are mainly /// used to implement accessibility scrolling on iOS. + /// + /// See also: + /// + /// * [RenderObject.describeSemanticsClip] static const SemanticsFlag isHidden = SemanticsFlag._(_kIsHiddenIndex); /// Whether the semantics node represents an image. diff --git a/lib/ui/semantics/semantics_node.h b/lib/ui/semantics/semantics_node.h index 861a1ad0f..6b7666830 100644 --- a/lib/ui/semantics/semantics_node.h +++ b/lib/ui/semantics/semantics_node.h @@ -119,8 +119,8 @@ struct SemanticsNode { std::string decreasedValue; int32_t textDirection = 0; // 0=unknown, 1=rtl, 2=ltr - SkRect rect = SkRect::MakeEmpty(); - SkM44 transform = SkM44{}; // Identity + SkRect rect = SkRect::MakeEmpty(); // Local space, relative to parent. + SkM44 transform = SkM44{}; // Identity std::vector childrenInTraversalOrder; std::vector childrenInHitTestOrder; std::vector customAccessibilityActions; -- GitLab