[Also submitted as FB20262774. Posting here in hopes of saving someone else from burning half a day chasing this down.]
Dynamic scaling of an Image()
in a Button(),
incorrectly decreases when transitioning from *** Large to AX 1 accessibility text sizes, instead of continuing to grow as expected. This occurs both on device and in the simulator, in iOS 18.6 and iOS 26.
Repro Steps
- Create a project with sample code below
- Show the preview if not showing
- In Xcode Preview, click Canvas Device Settings and change Dynamic Type from *** Large to AX 1
Sample Code
struct ContentView: View {
var body: some View {
VStack(spacing: 30) {
Text("Button Image Scaling Issue")
.font(.system(size: 24, weight: .semibold))
Text("Switch dynamic type from ***** Large** to **AX 1**. The **Button** icon shrinks while the **No Button** icon grows.")
.font(.system(size: 14, weight: .regular))
TestView(title: "No Button", isButton: false)
TestView(title: "Button", isButton: true)
}
.padding()
}
}
struct TestView: View {
let title: String
let isButton: Bool
var body: some View {
VStack {
Text(title)
.font(.system(size: 16))
.foregroundColor(.secondary)
if isButton {
Button {} label: {
Image(systemName: "divide")
.font(.system(.largeTitle))
}
.buttonStyle(.bordered)
.frame(height: 50)
} else {
Image(systemName: "divide")
.font(.system(.largeTitle))
.foregroundColor(.blue)
.frame(height: 50)
.background(Color.gray.opacity(0.2))
}
}
}
}
Expected Result
Both the button and non-button images should continue to scale up proportionally when moving to larger accessibility text sizes.
Actual Result
When going from *** Large to AX 1…
- Non-button image gets larger ✅
- Button image gets smaller ❌
Screen Recording
System Info
Xcode Version 26.0 (17A321) iOS 26.0 and 18.6