Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text scale accessibility issues caused by use of WidgetSpan #1250

Closed
1 task done
Brazol opened this issue Jul 6, 2022 · 0 comments · Fixed by #1569
Closed
1 task done

Text scale accessibility issues caused by use of WidgetSpan #1250

Brazol opened this issue Jul 6, 2022 · 0 comments · Fixed by #1569
Labels
bug Something isn't working sdk-issue Used for issues/bugs opened/reported by customers or us.

Comments

@Brazol
Copy link
Contributor

Brazol commented Jul 6, 2022

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

4.3.0

What happened?

There are multiple places where WidgetSpan is used, ex in MessageWidget:
image

WidgetSpan is reacting to textScaleFactor and resizing its content based on that. If the content is also reacting to text scale (for example Text widget) it will be resized twice.

In the case of MessageWidget the timestamp is getting way to big with larger text scale:
image

One solution is to wrap those children with MediaQuery and set textScaleFactor to 1 to avoid the second resizing.
MediaQuery( data: const MediaQueryData(textScaleFactor: 1.0), child: child, )

Steps to reproduce

Change the text scale in the Accessibility settings of the OS and see how the timestamp under the chat message gets way too big.

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Brazol Brazol added the bug Something isn't working label Jul 6, 2022
@adasiewiczr adasiewiczr added the sdk-issue Used for issues/bugs opened/reported by customers or us. label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdk-issue Used for issues/bugs opened/reported by customers or us.
Projects
None yet
2 participants