Skip to content

[a11y] With maximum accessibility font size, action buttons in AlertDialogs cause rendering overflow exceptions #42696

@jkurtw

Description

@jkurtw

b/142592672

  1. On iOS, go to Settings -> General -> Accessibility -> Larger Text and set to maximum.

  2. Observe dialogs with actions can have rendering exceptions.

Full repro code:

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: Scaffold(
        appBar: AppBar(title: Text('Alert Dialog Test')),
        body: Builder(
          builder: (context) => Center(
            child: RaisedButton(
              child: Text('Show Alert'),
              onPressed: () {
                showDialog(
                  context: context,
                  builder: (context) {
                    return AlertDialog(
                      title: Text('Alert Dialog'),
                      content: Text('Alert text'),
                      actions: [
                        FlatButton(onPressed: () {}, child: Text('Decline')),
                        FlatButton(onPressed: () {}, child: Text('Accept')),
                      ],
                    );
                  },
                );
              },
            ),
          ),
        ),
      ),
    );
  }
}

(We would like the text to show up fully, and we we would like them to be stacked vertically if they do not fit).

Metadata

Metadata

Assignees

Labels

a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: money (g3)f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions