Adding Semantics to the first widget on every page with Flutter

Viewed 521

Google Play warns me about missing Content labeling under Accessibility tests for every page the crawler can reach.

I've tried to add a Semantics Widget to every page to surround the body element of the scaffold, I've even added an Extra Container as the first child of this Semantics widget with double.infinity as width and height.

The only other thing I can think of doing is to make it the parent of the Scaffold - but what is the correct solution?

Somewhat related: Should SafeArea be the parent or the body element of the Scaffold?

enter image description here

1 Answers

Concerning the placement of the safearea, you should always put your scaffold first. In other words, wrap the safearea with the scaffold. The content label error from play console can also be solved by specifying information such as hint text in input fields or labels for buttons where necessary.

Related