I am developing a simple puzzle app in Flutter. I am using the draggable widget. Normally my code works perfectly (drag and drop is ok). But when accessibility mode is on (talkback) the draggable widget does not work. So the feedback widget does not appear.
The code snippet is as follows:
return ConstrainedBox(
constraints: BoxConstraints(
minWidth: width,
minHeight: height,
maxWidth: width,
maxHeight: height,
),
child: Semantics(
label: number,
excludeSemantics: true,
child: Draggable<int>(
data: i,
feedback: feedbackWidget(),
childWhenDragging: childWhenDraggingWidget(),
child: childWidget(),
),
),
);
I don't understand why it doesn't work in accessibility mode. Please share your ideas. Thanks
-
Hey, not a Flutter dev here but one of the reasons could be that accessible content shouldn't be dependent on gestures (imagine having wrist/finger injury). That being said you should have alternative accessible controls to perform a given action.TwistedOwl– TwistedOwl2025年02月08日 16:43:32 +00:00Commented Feb 8, 2025 at 16:43
lang-dart