Skip to content

Commit d92c42f

Browse files
authored
Minor a11y documentation breadcrumbs (flutter#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.
1 parent 94af181 commit d92c42f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/ui/semantics.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@ class SemanticsFlag {
479479
/// the semantics tree altogether. Hidden elements are only included in the
480480
/// semantics tree to work around platform limitations and they are mainly
481481
/// used to implement accessibility scrolling on iOS.
482+
///
483+
/// See also:
484+
///
485+
/// * [RenderObject.describeSemanticsClip]
482486
static const SemanticsFlag isHidden = SemanticsFlag._(_kIsHiddenIndex);
483487

484488
/// Whether the semantics node represents an image.

lib/ui/semantics/semantics_node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ struct SemanticsNode {
119119
std::string decreasedValue;
120120
int32_t textDirection = 0; // 0=unknown, 1=rtl, 2=ltr
121121

122-
SkRect rect = SkRect::MakeEmpty();
123-
SkM44 transform = SkM44{}; // Identity
122+
SkRect rect = SkRect::MakeEmpty(); // Local space, relative to parent.
123+
SkM44 transform = SkM44{}; // Identity
124124
std::vector<int32_t> childrenInTraversalOrder;
125125
std::vector<int32_t> childrenInHitTestOrder;
126126
std::vector<int32_t> customAccessibilityActions;

0 commit comments

Comments
 (0)