Skip to content

[macOS] selectable text does not announce the selection correctly in voice over #77833

@chunhtai

Description

@chunhtai
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/gestures.dart';
import 'package:url_launcher/url_launcher.dart';
void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
          body: Scaffold(
              body: Center(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      SelectableText.rich(
                        TextSpan(
                          children: <TextSpan>[
                            TextSpan(text: 'This', style: TextStyle(color: Colors.blue)),
                            TextSpan(text: 'is', style: TextStyle(color: Colors.black)),
                            TextSpan(
                                text: 'test',
                                style: TextStyle(
                                    color: Colors.blue, decoration: TextDecoration.underline),
                                recognizer: TapGestureRecognizer()
                                  ..onTap = () async {
                                    var url = "https://flutter.dev/";
                                    if (await canLaunch(url)) {
                                      await launch(url);
                                    } else {
                                      throw 'Could not launch $url';
                                    }
                                  }),
                          ],
                        ),
                        style: TextStyle(
                            color: Colors.blue, fontWeight: FontWeight.bold, fontSize: 48),
                        textAlign: TextAlign.center,
                      )
                      TextField(controller: TextEditingController(text: 'thisistext'),)
                    ],
                  )))),
    ),
  );
}
  1. in macOS, turn on voice over
  2. move focus to selectable text
  3. use mouse for selection

expect: the voice over should announce selection changes
actual: it only announces the word "selected" or "unselected"

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)engineflutter/engine related. See also e: labels.platform-macBuilding on or for macOS specificallywaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions