Skip to content

[a11y][Android] Checkbox and Switch state changes are not announced on Android 16 (SDK 36) #181321

Description

@math1man

Steps to reproduce

  1. Build an app that features checkboxes and/or switches
  2. Run it on a device running Android 16 (SDK 36)
  3. Enable TalkBack
  4. Observe the behavior of toggling checkboxes and switches

Expected results

Checkboxes should announce "checked" or "unchecked" when toggled. Switches should announce "on" or "off" when toggled.

Actual results

Nothing is announced. On Android 15 (SDK 35) and older versions, announcements work correctly.

Code sample

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: false),
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool _checked = false;
  bool _toggled = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title, style: TextStyle(fontFamily: 'ProductSans')),
      ),
      body: ListView(
        children: [
          Text('Checkbox is ${_checked ? 'checked' : 'unchecked'}.'),
          CheckboxListTile(
            title: Text('Checkbox'),
            value: _checked,
            onChanged: (value) {
              if (value == null) return;
              setState(() {
                _checked = value;
              });
            },
          ),
          Text('Switch is ${_toggled ? 'toggled' : 'untoggled'}.'),
          SwitchListTile(
            title: Text('Switch'),
            value: _toggled,
            onChanged: (value) {
              setState(() {
                _toggled = value;
              });
            },
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Logs

N/A

Flutter Doctor output

N/A, google internal client

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: regressionIt was better in the past than it is nowcustomer: googleVarious Google teamscustomer: huggsy (g3)e: OS-version specificAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility team

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions