Use case
When HTML contains links, then they should have button (or link) semantics so screen readers announce them correctly and Voice Control has item labels. This can currently be achieved via custom factoryBuilder.
Proposal
I think this should be a standard behavior: wrapping MouseRegion with Semantics(button: true) or similar.
|
Widget? buildGestureDetector( |
|
BuildTree tree, |
|
Widget child, |
|
GestureRecognizer recognizer, |
|
) { |
|
var built = child; |
|
|
|
if (recognizer is TapGestureRecognizer) { |
|
built = MouseRegion( |
|
cursor: SystemMouseCursors.click, |
|
child: GestureDetector(onTap: recognizer.onTap, child: child), |
|
); |
|
} |
|
|
|
return built; |
|
} |
Use case
When HTML contains links, then they should have button (or link) semantics so screen readers announce them correctly and Voice Control has item labels. This can currently be achieved via custom
factoryBuilder.Proposal
I think this should be a standard behavior: wrapping
MouseRegionwithSemantics(button: true)or similar.flutter_widget_from_html/packages/core/lib/src/core_widget_factory.dart
Lines 261 to 276 in a564ad8