Skip to content

RadioGroup allows selecting disabled items when using keyboard navigation on web and desktop #176398

@plamenad-via

Description

@plamenad-via

Steps to reproduce

  1. Create a simple RadioGroup with a few items
  2. Make sure one of them is disabled (enabled: false)
  3. When running the app, use keyboard navigation and move through the items via keyboard up/down arrows.

Expected results

Disabled RadioListItem cannot be selected.
Disabled RadioListItem is skipped in keyboard navigation.

Actual results

Disabled RadioListItem can be selected the same as enabled ones; Additionally, keyboard navigation (forward) gets stuck on this item and cannot proceed further.

Code sample

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: const MyHomePage());
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int? selected = 1;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: RadioGroup<int?>(
          groupValue: selected,
          onChanged: (value) {
            setState(() {
              selected = value!;
            });
          },
          child: Column(
            children: [
              RadioListTile<int?>(value: 1, title: Text('one')),
              RadioListTile<int?>(value: 2, title: Text('two'), enabled: false),
              RadioListTile<int?>(value: 3, title: Text('three')),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration Image
Screen.Recording.2025-10-02.at.12.14.55.mov

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.35.4, on macOS 26.0 25A354 darwin-arm64, locale en-US) [553ms]
    • Flutter version 3.35.4 on channel stable at [PII]
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d693b4b9db (2 weeks ago), 2025-09-16 14:27:41 +0000
    • Engine revision c298091351
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
      cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc1) [1,649ms]
    • Android SDK at [PII]
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-35, build-tools 36.0.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1) [1,407ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17A400
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [10ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [9ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)

[✓] VS Code (version 1.95.1) [8ms]
    • VS Code at [PII]
    • Flutter extension version 3.100.0

[✓] Connected device (2 available) [8.6s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 26.0 25A354 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 141.0.7390.55

[✓] Network resources [503ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: desktopRunning on desktopfound 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 onplatform-webWeb applications specificallyteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions