Skip to content

Flutter-web: Snackbar not read in NVDA screen reader #108768

@whsliuyun

Description

@whsliuyun

Steps to Reproduce

  1. Window's NVDA screen reader on.
  2. Run flutter web with example snackbar app. https://docs.flutter.dev/cookbook/design/snackbars#interactive-example
  3. Click button to show snackbar.

Expected results: Snackbar content should be read

Actual results: It is not read.

I did some investigation, per MDN

Simply including an aria-live attribute or a specialized live region role (such as role="alert") in the initial markup as it's loaded will have no effect.

Dynamically adding an element with an aria-live attribute or specialized role to the document also won't result in any announcement by assistive technologies (as, at that point, the browser/assistive technologies are not aware of the live region yet, so cannot monitor it for changes).

Always make sure that the live region is present in the document first, and only then dynamically add/change any content.

So we should first have an empty aria-live within dom and then change the content. However I don't see any workaround for this.

Semantic(liveregion:true, child: Text('')) won't create a live region since the content is empty. I couldn't add a meaningful live-region element either, because other platform: native Android works fine.

Any suggestions?

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: troyfound in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions