Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ extension AccessibilityLinkRotorBridge {
elements.removeAll(keepingCapacity: true)
paragraph.enumerateAttribute(.coreAXLink, in: NSRange(location: 0, length: paragraph.length)) { value, range, _ in
if value as? Bool == true {
elements.append(Self.linkElement(for: node, range: range))
self.elements.append(Self.linkElement(for: node, range: range))
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/OpenSwiftUICore/View/Text/Text/Text+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,7 @@ private struct DynamicTextView: PrimitiveView, UnaryView {
private struct DynamicTextHelper: SizeFittingTextResolver {
let view: DynamicTextView
lazy var widthAdaptedText: ResolvedStyledText = {
let currentSizeVariant = sizeVariant
var isUniqueSizeVariant = sizeVariant == .regular
let storage: NSMutableAttributedString?
if view.text.layoutProperties.sizeFitting {
Expand All @@ -1695,7 +1696,7 @@ private struct DynamicTextView: PrimitiveView, UnaryView {
) as? any ResolvableStringAttribute else {
return
}
let variant = resolvable.sizeVariant(sizeVariant)
let variant = resolvable.sizeVariant(currentSizeVariant)
isUniqueSizeVariant = isUniqueSizeVariant || variant.exact
result.addAttribute(
value.resolvableAttributeKey,
Expand Down