Skip to content

DropdownMenu items semantics break if the widget is wrapped inside a scrollable view #175184

@lore-co

Description

@lore-co

Steps to reproduce

  • Create a page with a DropdownMenu
  • Wrap the DropdownMenu with a SingleChildScrollView

Expected results

The semantics for each item should be read when the menu is expanded

Actual results

As title says, if the DropdownMenu widget is wrapped inside a scrollable view (ListView or SingleChildScrollView), the semantics for its items will be completely ignored.

Code sample

Code sample
  @override
  Widget build(BuildContext context) {
    final items = ['Item 1', 'Item 2', 'Item 3'];

    return Scaffold(
      body: Center(
        child: SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisSize: MainAxisSize.min,
            children: [
              DropdownButton<String>(
                items: items
                    .map(
                      (e) => DropdownMenuItem(
                        value: e,
                        child: Text(e),
                      ),
                    )
                    .toList(),

                onChanged: (v) {},
              ),
              SizedBox(height: 16),
              DropdownMenu<String>(
                showTrailingIcon: false,
                dropdownMenuEntries: items
                    .map(
                      (e) => DropdownMenuEntry(
                        value: e,
                        label: e,
                      ),
                    )
                    .toList(),
              ),
            ],
          ),
        ),
      ),
    );
  }

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.1, on macOS 15.5 24F74 darwin-arm64, locale en-IT)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] IntelliJ IDEA Community Edition (version 2023.2.1)
[✓] VS Code (version 1.99.0)
[✓] Connected device (2 available)
[✓] Network resources

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: chalk (g3)f: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.found in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility team

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions