Request focus if SemanticsAction.focus is sent to a focusable widget (#142942)

## Description

This causes the `Focus` widget to request focus on its focus node if the accessibility system (screen reader) focuses a widget via the `SemanticsAction.focus` action.

## Related Issues
 - https://github.com/flutter/flutter/issues/83809

## Tests
 - Added a test to make sure that focus is requested when `SemanticsAction.focus` is sent by the engine.
This commit is contained in:
Greg Spencer
2024-06-04 17:42:59 -07:00
committed by GitHub
parent 4d21d2dd5f
commit dd700e6d7c
58 changed files with 281 additions and 70 deletions

View File

@@ -20,6 +20,7 @@ void main() {
isEnabled: true,
isFocusable: true,
hasTapAction: true,
hasFocusAction: true,
label: 'Update border shape',
));
@@ -29,6 +30,7 @@ void main() {
isEnabled: true,
isFocusable: true,
hasTapAction: true,
hasFocusAction: true,
label: 'Reset chips',
));