Repository navigation
Description
Steps to reproduce
- Run an app on web with semantics enabled, using
package:material_ui, withScaffold(drawer: Drawer(...))orScaffold(drawer: NavigationDrawer(...)). The a11y_assessments test app inpackages/material_ui/test_apps/a11y_assessmentsshows it on#/drawerand#/navigation-drawer. - Open the drawer with the menu button.
- Inspect the drawer in the accessibility tree, or listen with a screen reader.
Expected results
The open drawer is modal: the page behind it is hidden from assistive technology and Tab stays inside it. It should be exposed as a modal dialog, following the WAI-ARIA modal dialog pattern, https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/:
- the container has
role="dialog" - the controls that operate it are descendants of that container
- the container has
aria-modal="true" - the container has an accessible name, here
aria-label="Navigation menu"
Actual results
The drawer container is role="region" with aria-label="Navigation menu" and no aria-modal, so screen readers announce a region and nothing tells them the rest of the page is inert. Chrome's accessibility tree shows region "Navigation menu".
material_ui Drawer builds Semantics(scopesRoute: true, namesRoute: true, label: ...) with no role, and the web engine maps a labeled named route to role="region". The engine already maps SemanticsRole.dialog to role="dialog" with aria-modal="true", as material_ui Dialog uses.
Code sample
import 'package:material_ui/material_ui.dart';
void main() => runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Drawer')),
drawer: const Drawer(
child: Column(children: <Widget>[ListTile(title: Text('Messages'))]),
),
),
),
);Flutter Doctor output
Reproduces on current master with package:material_ui on web.
Activity
flutter-triage-bot commentedon Nov 14, 2026
Issue is assigned to multiple teams (design, web). Please ensure the issue has only one
team-*label at a time. Usefyi-*labels to have another team look at the issue without reassigning it.[VPAT] Expose modal drawers with the dialog semantics role (flutter#1…