Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jiahaog
Copy link
Member

@jiahaog jiahaog commented Jul 2, 2024

Reverts #53360

Breaking google3 in b/350131288.

There is a test that does something like the following, to check if a radio button is selected.

      // Send a bunch of tabs to focus on the correct radio button
      await tester.sendKeyEvent(LogicalKeyboardKey.tab);
      await tester.pump();
      await tester.sendKeyEvent(LogicalKeyboardKey.tab);
      await tester.pump();
      await tester.sendKeyEvent(LogicalKeyboardKey.tab);
      await tester.pump();

      // Toggle the radio button with space
      await tester.sendKeyEvent(LogicalKeyboardKey.space);
      await tester.pump();

      final selectedRadio =
          tester.widget<Radio<bool>>(find.byType(Radio<bool>).at(1));
      expect(selectedRadio.value, isTrue);

After this commit, the above test fails. See the linked bug above for more details.

@jiahaog jiahaog requested a review from yjbanov July 2, 2024 06:15
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jul 2, 2024
@yjbanov
Copy link
Contributor

yjbanov commented Jul 2, 2024

Typically this means the test needs to be updated.

@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 2, 2024
@auto-submit auto-submit bot merged commit 0409cc5 into main Jul 2, 2024
@auto-submit auto-submit bot deleted the revert-53360-web-a11y-focus branch July 2, 2024 17:02
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 2, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 2, 2024
…151186)

flutter/engine@433d360...4427894

2024-07-02 [email protected] Roll Skia from 42fad315c162 to c0ee0e108900 (1 revision) (flutter/engine#53691)
2024-07-02 [email protected] Revert "[web] switch from .didGain/LoseAccessibilityFocus to .focus" (flutter/engine#53679)
2024-07-02 [email protected] [skia] Use more GNI file lists (flutter/engine#53685)
2024-07-02 [email protected] Roll Skia from 7f2094d4cf43 to 42fad315c162 (1 revision) (flutter/engine#53684)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jul 8, 2024
…lutter#151186)

flutter/engine@433d360...4427894

2024-07-02 [email protected] Roll Skia from 42fad315c162 to c0ee0e108900 (1 revision) (flutter/engine#53691)
2024-07-02 [email protected] Revert "[web] switch from .didGain/LoseAccessibilityFocus to .focus" (flutter/engine#53679)
2024-07-02 [email protected] [skia] Use more GNI file lists (flutter/engine#53685)
2024-07-02 [email protected] Roll Skia from 7f2094d4cf43 to 42fad315c162 (1 revision) (flutter/engine#53684)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request Jul 15, 2024
This relands #53679.

The difference from the previous attempt is in the last commit, which prevents synthetic focus requests from echoing back into the framework. That part broke too many tests in g3 and needs to be revisited.

## Original description

Stop using `SemanticsAction.didGain/LoseAccessibilityFocus` on the web, start using `SemanticsAction.focus`. This is because on the web, a11y focus is not observable, only input focus is. Sending `SemanticsAction.focus` will guarantee that the framework move focus to the respective widget. There currently is no "unfocus" signal, because it seems to be already covered: either another widget gains focus, or an HTML DOM element outside the Flutter view does, both of which have their respective signals already.

More details in the discussion in the issue flutter/flutter#83809.

Fixes flutter/flutter#83809
Fixes flutter/flutter#148285
Fixes flutter/flutter#143337
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants