[a11y] [Android] TalkBack does not announce Table / DataTable due to missing Role.TABLE mapping in Android embedding
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
Reference: b/238751476
### Steps to reproduce
1. Create a Flutter application that displays a DataTable or Table widget with multiple columns and rows of data.
2. Install and launch the application on an Android device or emulator with Android TalkBack enabled in the accessibility settings.
3. Move TalkBack focus onto the table container itself.
### Expected results
When TalkBack focuses on the table container, it should announce that the widget is a table along with its total column and row count (for example, "Table, 2 columns and 2 rows").
### Code sample
import 'package:flutter/material.dart';
void main() => runApp(const MaterialApp(home: DataTableAccessibilityTest()));
class DataTableAccessibilityTest extends StatelessWidget {
const DataTableAccessibilityTest({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('DataTable TalkBack Accessibility Test'),
),
body: Center(
child: DataTable(
columns: const [
DataColumn(label: Text('Item')),
DataColumn(label: Text('Price')),
],
rows: const [
DataRow(
cells: [
DataCell(Text('Apple')),
DataCell(Text('\$1.00')),
],
),
DataRow(
cells: [
DataCell(Text('Banana')),
DataCell(Text('\$0.50')),
],
),
],
),
),
);
}
}
### Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
### Logs
Logs
```console
[Paste your logs here]
```
### Flutter Doctor output
Doctor output
```console
[Paste your output here]
```
Contributor guide
Assessment
This issue has not been assessed yet.