Skip to content

[a11y] androidTapTargetGuideline is too permissive #173208

@bleroux

Description

@bleroux

Steps to reproduce

  1. Add the provided test to flutter/packages/flutter/material/time_picker_test.dart
  2. Run the test

Expected results

The tests fails as AM/PM buttons height (40) is lower than the minimum interactive dimensions (48).

Visual screenshot which shows AM/PM semantics bounds (width is 48, height is 40):
image

Actual results

The test passes.

Code sample

Code sample
    testWidgets('Period selector touch target respects accessibility guidelines - Portrait mode', (
      WidgetTester tester,
    ) async {
      final SemanticsTester semantics = SemanticsTester(tester);

      // Ensure picker is displayed in portrait mode.
      tester.view.physicalSize = const Size(600, 1000);
      tester.view.devicePixelRatio = 1.0;
      addTearDown(tester.view.reset);

      await mediaQueryBoilerplate(tester, materialType: materialType);

      await expectLater(tester, meetsGuideline(androidTapTargetGuideline));

      semantics.dispose();
    });

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.33.0-1.0.pre-1256, on Ubuntu 24.04.2 LTS 6.8.0-71-generic, locale fr_FR.UTF-8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: tests"flutter test", flutter_test, or one of our testsfound in release: 3.29Found to occur in 3.29found in release: 3.33Found to occur in 3.33frameworkflutter/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

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions