Yegor c5a8a826ef [web] switch from .didGain/LoseAccessibilityFocus to .focus (flutter/engine#53360)
This is a repeat of https://github.com/flutter/engine/pull/53134, which was merged prematurely.

> [!WARNING]  
> Only land this after:
> * https://github.com/flutter/flutter/pull/149840 lands in the framework.
> * You have personally manually tested the change together with the latest framework on all browsers.

## Original PR 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 https://github.com/flutter/flutter/issues/83809.

Fixes https://github.com/flutter/flutter/issues/83809
Fixes https://github.com/flutter/flutter/issues/148285
Fixes https://github.com/flutter/flutter/issues/143337
2024-06-28 21:35:10 +00:00
..