Accessibility Scanner on Flutter app always say no readable lable issue?

Viewed 1214

Why I did a accessibility analysis on flutter app getting message as follows:

This item may not have a label readable by screen readers.

enter image description here

My widget has this code:

Semantics(
  label: 'Login page.',
  child: Scaffold(
    backgroundColor: Colors.grey[900],
    body: Container(
      padding: EdgeInsets.all(25),
      child: Center(
        child: Text("My app!!!", style: labelTextStyle, semanticsLabel: 'app of semantic',)
      ),
    ),
  ),
);

How to fix this?

1 Answers

I work closely with a friend who is blind and uses screens readers to code and use his phone.

Using Semantics on top of an Scaffold would make the whole page to only say the label (in your case Login Page.) So the Accessibility Inspector is telling you that one of the labels (the Text's one) will not be readable by screens readers because the Semantics is over of it.

Related