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

[BUG] Accessibility and scaling #1211

Closed
theSharpestTool opened this issue Dec 28, 2022 · 10 comments
Closed

[BUG] Accessibility and scaling #1211

theSharpestTool opened this issue Dec 28, 2022 · 10 comments
Labels
accessibility Issues with accessibility (font scaling, screen readers, etc.) bug Something isn't working
Milestone

Comments

@theSharpestTool
Copy link

Issue #308 occurs again in 3.0.0-alpha.6. While in 3.0.0-alpha.5 text scaling works fine.

To reproduce set the text size to large in the device settings and check the following code:

import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    const heading2Style = TextStyle(
      fontSize: 24,
      fontWeight: FontWeight.bold,
    );

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const Padding(
                padding: EdgeInsets.only(left: 8),
                child: Text(
                  'Heading2',
                  style: heading2Style,
                ),
              ),
              Html(
                data: '<h2>Heading2</h2>',
                style: {
                  'h2': Style.fromTextStyle(heading2Style),
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}

3.0.0-alpha.5

Simulator Screen Shot - iPhone 14 Pro Max - 2022-12-28 at 19 18 36

3.0.0-alpha.6

Simulator Screen Shot - iPhone 14 Pro Max - 2022-12-28 at 19 23 58

@theSharpestTool theSharpestTool added the bug Something isn't working label Dec 28, 2022
@esconts
Copy link

esconts commented Dec 28, 2022

+1

1 similar comment
@martijnvanderlaan
Copy link

+1

@lflorent
Copy link

lflorent commented Jan 5, 2023

+1 I confirm this issue with 3.0.0 alpha 6.

@lflorent
Copy link

lflorent commented Jan 5, 2023

I discover that there is a fix on master branch not available on last alpha.8 release.

This fix works for me.

@Sub6Resources maybe you can merge your fix in next alpha release ? Thanks

@daveshirman
Copy link

For anyone struggling with this as of today (02/02/2023) - I added this repo to my dependency_overrides in pubspec.yaml:

dependency_overrides:
  flutter_html:
    git:
      url: https://github.com/Sub6Resources/flutter_html  

I would note that it's not a 100% fix, because now the html text doesn't respect (grow or shrink) the system accessibility scaling at all.

@TNelen
Copy link

TNelen commented Feb 27, 2023

+1

2 similar comments
@iamriajul
Copy link

+1

@ara-mentz
Copy link

+1

@Sub6Resources Sub6Resources added in-triage Issue's that I've seen but haven't had a chance to thoroughly review and/or categorize accessibility Issues with accessibility (font scaling, screen readers, etc.) labels May 9, 2023
@Sub6Resources Sub6Resources added this to the 3.0.0 milestone May 9, 2023
@Sub6Resources Sub6Resources removed the in-triage Issue's that I've seen but haven't had a chance to thoroughly review and/or categorize label May 16, 2023
@Sub6Resources
Copy link
Owner

Able to reproduce on current master branch. Looking into it!

@Sub6Resources
Copy link
Owner

Fixed in #1259. Changes should be published in 3.0.0-beta.2 by the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issues with accessibility (font scaling, screen readers, etc.) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants