Steps to reproduce
- Enable the Orca screen reader on Linux.
- Run the attached code sample as a Linux desktop application (flutter run -d linux).
- Press the Tab key to move keyboard focus to the second element on the screen.
- Observe the Orca speech output.
Expected results
When focusing the first element, Orca should read "I am focusable normal text".
When tabbing to the second element, Orca should read the text payload followed by the semantic role (e.g., "I am a focusable header, header").
Actual results
When tabbing to the second element, Orca drops the text payload entirely and simply announces "header".
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const BugReproApp());
}
class BugReproApp extends StatelessWidget {
const BugReproApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// 1. Focusable Text (Works)
// Orca correctly reads "I am focusable normal text".
Focus(
autofocus: true,
child: const Text('I am focusable normal text'),
),
const SizedBox(height: 50),
// 2. Focusable Header (Bugged)
// Because of the header trait, Orca drops the text payload completely and only announces "header".
Focus(
child: Semantics(
header: true,
child: const Text('I am a focusable header'),
),
),
],
),
),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.41.5, on Ubuntu Resolute Raccoon (development branch) 7.0.0-10-generic, locale
en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Connected device (1 available)
[✓] Network resources
! Doctor found issues in 2 categories.
Steps to reproduce
Expected results
When focusing the first element, Orca should read "I am focusable normal text".
When tabbing to the second element, Orca should read the text payload followed by the semantic role (e.g., "I am a focusable header, header").
Actual results
When tabbing to the second element, Orca drops the text payload entirely and simply announces "header".
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output