Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility teamTriaged by Framework Accessibility team
Description
Steps to reproduce
testWidgets('stale semantics label', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
Widget build(String label) => Directionality(
textDirection: TextDirection.ltr,
child: RichText(text: TextSpan(text: 'hello', semanticsLabel: label)),
);
await tester.pumpWidget(build('first'));
await tester.pumpWidget(build('second'));
expect(tester.getSemantics(find.byType(RichText)).label, 'second');
handle.dispose();
});Expected results
The semantics label is second, so a screen reader announces the new label.
Actual results
The label stays first. The same happens when only locale changes (the LocaleStringAttribute keeps the old locale), and for semanticsIdentifier and spellOut.
TextSpan.compareTo only looks at recognizer for metadata changes, so it returns RenderComparison.identical and RenderParagraph.text returns early. TextSpan.== and hashCode also ignore locale and spellOut. Separately, the metadata branch of RenderParagraph.text doesn't clear _cachedAttributedLabels, so even a metadata result would keep the old label.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility teamTriaged by Framework Accessibility team
Activity
suryaKommana2662 commentedon Nov 2, 2026
@ChandraChaan Thanks for the report. I was able to reproduce this issue locally using the provided test case. Routing to
team-accessibilityfor further investigation.Logs
Flutter Doctor Output
hannah-hyj commentedon Nov 4, 2026
From triage: Look like there is a draft PR for this issue already!