Skip to content

Conversation

@cybernova2
Copy link

Fixes: #1962

This PR improves accessibility by adding Semantics widgets around loading
indicators so screen readers (TalkBack / VoiceOver) announce that the app is
loading content.

What’s changed

  • Wrapped CircularProgressIndicator (and similar loading states) in:
    Semantics(label: 'Loading…', liveRegion: true)
  • Updated loading indicators in:
    • message_list.dart
    • topic_list.dart
    • home.dart / action_sheet.dart (where applicable)
  • Kept changes minimal and within existing widgets, as requested.

Why

Screen readers were not able to focus on or announce the loading state,
making the app inaccessible while fetching messages or topics.

Testing

  • Verified on Android emulator with TalkBack:
    When loading appears, TalkBack reads: "Loading…".
  • Confirmed that no visual changes occurred.

Screenshot (TalkBack focus on loading indicator)

This shows the loading indicator now exposes an accessible label via Semantics().

Loading indicator with TalkBack focus

Let me know if you prefer a localized label or a different semantics approach!

@cybernova2 cybernova2 force-pushed the fix-loading-indicator-semantics branch from 730a93a to eefd034 Compare December 5, 2025 07:02
@chrisbobbe
Copy link
Collaborator

Hello, welcome! Before we can review this, it'll need to be organized into clear and coherent commits, and it'll need test coverage.

- Add localized semanticsLabel for loading indicators
- Add/adjust widget tests to assert the semantics label
- Update tests in topic_list/home/message_list/action_sheet as needed
@cybernova2 cybernova2 force-pushed the fix-loading-indicator-semantics branch from 7e043e6 to 9daf035 Compare December 6, 2025 18:18
@cybernova2
Copy link
Author

hello @chrisbobbe , i have updated this and here is

Summary

This PR adds an accessible semantics label to the loading indicators and updates the related widget tests accordingly.
The goal is to improve screen-reader support and ensure that loading states are properly exposed in the semantics tree.

What’s Changed

  • Added a localized semanticsLabel to the loading indicators.
  • Updated widget tests in:
    • home_test.dart
    • message_list_test.dart
    • topic_list_test.dart
  • Updated affected widgets to use the label consistently.
  • Cleaned up previous commit history into a single coherent commit.

Why This Is Needed

Some loading indicators were previously missing explicit semantics labels, preventing screen readers from announcing loading states.
This update improves accessibility and ensures more predictable behavior for assistive technologies.

Testing

  • All updated tests pass:
    -Verified that find.bySemanticsLabel(...) correctly locates the loading indicators.
    -Ensured no regressions in navigation or layout.
    -flutter analyze reports no new warnings.

@chrisbobbe
Copy link
Collaborator

This PR makes a lot of unrelated formatting changes, in ways that make the code inconsistent with the project style (e.g. changing two-space indents to four-space indents). Please remove those changes, to keep the codebase neat and help the reviewers focus on the substantive changes you want to make.

@cybernova2
Copy link
Author

cybernova2 commented Dec 9, 2025

Thank you @chrisbobbe sir for the earlier feedback!
I'm closing this PR because it included unrelated formatting changes that made the diff hard to review.
I’ve created a new PR that contains only the accessibility-related updates—no formatting noise, just the Semantics wrappers and test changes.

Here is the new PR: #2025

Thanks again for the guidance.

@cybernova2 cybernova2 closed this Dec 9, 2025
@sm-sayedi
Copy link
Collaborator

@cybernova2 For the future, there is no need to close a PR and then open a new one just for some new changes. Please have a look at https://zulip.readthedocs.io/en/latest/git/fixing-commits.html on how to edit the existing commits, and then force push the new changes to the same remote branch (PR in this case).

@cybernova2
Copy link
Author

@sm-sayedi sir Thanks for the guidance This branch had become too messy, so I opened a new one this time. But I understand the recommended workflow now and will amend commits + force-push to the same branch going forward.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Semantics for loading screen/indicator

3 participants