Skip to content

SwiftUI legend truncates multiline accessibility descriptions #354

Description

@kyleve

Posted by an AI agent on kyleve’s behalf.

Description

The SwiftUI accessibility annotation renderer truncates a long marker description with an ellipsis even though DescriptionView allows unlimited lines. The underlying accessibility label and value are complete; only the rendered legend is shortened.

A 402 × 158 point accessibility element with label “Days in 2026” and value “California: 132 days, New York: 41 days, Canada: 9 days, and European Union: 4 days” reproduces this on AccessibilitySnapshot 0.12.0. The legend currently ends after “Cana…”.

Expected behavior

The legend should grow vertically and wrap the complete description onto additional lines.

Root cause

The SwiftUI Text remains vertically compressible inside the constrained legend layout. Applying fixed vertical sizing after constraining horizontal sizing allows the text to report its multiline intrinsic height.

Discovered while reviewing the accessibility snapshot in kyleve/Stuff#256 (comment).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions