Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Web: an announcement made while a modal dialog is open silences every later SemanticsService announcement on the page

Aperta
#6,903 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
flutter, playwright, python

Direzione di ricerca

Start by reproducing the three-step flow in a plain Flutter web app with SemanticsService.announce, a TextField(maxLength: 6), and showDialog, then compare its announcement elements with the Flet web client behavior. Check whether the announcement host is removed when the dialog closes; done means identifying whether the fix belongs in Flet or upstream Flutter and preserving later announcements.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

On Flet 1.0.1 (web), when Flutter makes an accessibility announcement while a modal dialog is open (for example the
"N characters remaining" counter of a TextField with max_length), the page's <flt-announcement-polite> element is
moved into the dialog's <flt-semantics> node. Closing the dialog removes that node, and with it the announcement
element. After that, no SemanticsService.announce_message call is heard again until the page is reloaded.

The same dialog without max_length leaves <flt-announcement-host> intact, and later announcements are heard.

Steps to reproduce
import flet as ft


async def main(page: ft.Page) -> None:
    def announce(e: ft.Event) -> None:
        svc = next((s for s in page.services if isinstance(s, ft.SemanticsService)), None) or ft.SemanticsService()
        page.run_task(svc.announce_message, "Hello from the page")

    def dialog(with_counter: bool) -> ft.AlertDialog:
        return ft.AlertDialog(modal=True, title=ft.Text("Enter code"),
                              content=ft.TextField(label="Code", max_length=6 if with_counter else None),
                              actions=[ft.TextButton(content=ft.Text("Close"), on_click=lambda e: page.pop_dialog())])

    page.add(ft.Column([
        ft.Button(content=ft.Text("Announce"), on_click=announce),
        ft.Button(content=ft.Text("Open dialog"), on_click=lambda e: page.show_dialog(dialog(True))),
        ft.Button(content=ft.Text("Open dialog (no counter)"), on_click=lambda e: page.show_dialog(dialog(False))),
    ]))


ft.run(main, view=ft.AppView.WEB_BROWSER, port=8700, host="127.0.0.1")

Open http://127.0.0.1:8700 in Chrome with a screen reader (or the accessibility tree / DOM inspector open), then:

  1. Click Announce. It is heard: the text lands in <flt-announcement-polite> inside <flt-announcement-host>.
  2. Click Open dialog, type 3 digits into the field (Flutter announces "N characters remaining"), then click Close.
  3. Click Announce again.
Expected

Step 3 is announced, as in step 1.

Actual

Step 3 is not announced. While the dialog was open, <flt-announcement-polite> was re-parented into the dialog's
<flt-semantics> node, and it was removed with that node when the dialog closed. Nothing is announced again on that
page until a reload.

Control: repeating step 2 with Open dialog (no counter) leaves the announcement host in place, and step 3 is heard.

Measured

Headless Chromium at 390×844. "Heard" means the text reached an attached flt-announcement-* element, polled every
50 ms. With the counter: the announcement before the dialog was heard and the one after it was not. Without the counter:
both were heard.

Environment
  • Flet 1.0.1, web (server mode, stock web client)
  • Chromium (Playwright), macOS
Not yet established

Whether this is in Flutter's web engine or in Flet's web client. The deciding test is the same three steps in a plain
Flutter web app (SemanticsService.announce, a TextField(maxLength: 6) inside showDialog), and it has not been run.
If it reproduces there, this belongs upstream in flutter/flutter.

Lingua principale
Python
Stelle
17.4k
Fork
728
Merge medio
1g 9h
PR unite (30g)
58

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di flet-dev/flet

Tutte le issue di flet-dev/flet

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.