Skip to content

Preserve source text in prepared text layouts - #59085

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D125246577
Closed

javache wants to merge 1 commit into
react:mainfrom
javache:export-D125246577

Conversation

@javache

@javache javache commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary:
Prepared text layouts used Layout.text for both rendering and semantic consumers. Android replaces that text with an ellipsis and filler characters when the layout is truncated, causing accessibility services and view hierarchy tools to lose the full logical string.

Retain the source Spanned text alongside the display Layout and preserve it through layout reuse and stateful-span proxying. Semantic consumers now receive the full source text, while drawing, touch handling, and hit testing continue to use the display-shaped layout text.

Changelog:
[Android][Fixed] - Preserve full semantic text for ellipsized prepared text layouts

Differential Revision: D125246577

Summary:
Prepared text layouts used `Layout.text` for both rendering and semantic consumers. Android replaces that text with an ellipsis and filler characters when the layout is truncated, causing accessibility services and view hierarchy tools to lose the full logical string.

Retain the source `Spanned` text alongside the display `Layout` and preserve it through layout reuse and stateful-span proxying. Semantic consumers now receive the full source text, while drawing, touch handling, and hit testing continue to use the display-shaped layout text.

Changelog:
[Android][Fixed] - Preserve full semantic text for ellipsized prepared text layouts

Differential Revision: D125246577
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 14, 2026
@meta-codesync

meta-codesync Bot commented Oct 14, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125246577.

@javache
javache deleted the export-D125246577 branch October 16, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant