• Taha Tesser's avatar
    `CalendarDatePicker` doesn't announce selected date on desktop (#143583) · 5d2353c1
    Taha Tesser authored
    fixes [Screen reader is not announcing the selected date as selected on DatePicker](https://github.com/flutter/flutter/issues/143439)
    
    ### Descriptions
    - This fixes an issue where `CalendarDatePicker` doesn't announce selected date on desktop.
    - Add semantic label to describe the selected date is indeed "Selected".
    
    ### Code sample
    
    <details>
    <summary>expand to view the code sample</summary> 
    
    ```dart
    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          home: MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      const MyHomePage({super.key, required this.title});
    
      final String title;
    
      @override
      MyHomePageState createState() => MyHomePageState();
    }
    
    class MyHomePageState extends State<MyHomePage> {
      void _showDatePicker() async {
        await showDatePicker(
          context: context,
          initialDate: DateTime.now(),
          firstDate: DateTime(1900),
          lastDate: DateTime(2200),
        );
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title,
                style: const TextStyle(fontFamily: 'ProductSans')),
          ),
          body: const Center(
            child: Text('Click the button to show date picker.'),
          ),
          floatingActionButton: FloatingActionButton(
            onPressed: _showDatePicker,
            tooltip: 'Show date picker',
            child: const Icon(Icons.edit_calendar),
          ),
        );
      }
    }
    
    // import 'package:flutter/material.dart';
    
    // void main() => runApp(const MyApp());
    
    // class MyApp extends StatelessWidget {
    //   const MyApp({super.key});
    
    //   @override
    //   Widget build(BuildContext context) {
    //     return MaterialApp(
    //       debugShowCheckedModeBanner: false,
    //       home: Scaffold(
    //         body: Center(
    //           child: CalendarDatePicker(
    //             initialDate: DateTime.now(),
    //             firstDate: DateTime(2020),
    //             lastDate: DateTime(2050),
    //             onDateChanged: (date) {
    //               print(date);
    //             },
    //           ),
    //         ),
    //       ),
    //     );
    //   }
    // }
    ```
    
    </details>
    
    ### Before
    
    https://github.com/flutter/flutter/assets/48603081/c82e1f15-f067-4865-8a5a-1f3c0c8d91da
    
    ### After
    
    https://github.com/flutter/flutter/assets/48603081/193d9e26-df9e-4d89-97ce-265c3d564607
    5d2353c1
Name
Last commit
Last update
..
README.md Loading commit data...
cupertino_af.arb Loading commit data...
cupertino_am.arb Loading commit data...
cupertino_ar.arb Loading commit data...
cupertino_as.arb Loading commit data...
cupertino_az.arb Loading commit data...
cupertino_be.arb Loading commit data...
cupertino_bg.arb Loading commit data...
cupertino_bn.arb Loading commit data...
cupertino_bs.arb Loading commit data...
cupertino_ca.arb Loading commit data...
cupertino_cs.arb Loading commit data...
cupertino_cy.arb Loading commit data...
cupertino_da.arb Loading commit data...
cupertino_de.arb Loading commit data...
cupertino_de_CH.arb Loading commit data...
cupertino_el.arb Loading commit data...
cupertino_en.arb Loading commit data...
cupertino_en_AU.arb Loading commit data...
cupertino_en_CA.arb Loading commit data...
cupertino_en_GB.arb Loading commit data...
cupertino_en_IE.arb Loading commit data...
cupertino_en_IN.arb Loading commit data...
cupertino_en_NZ.arb Loading commit data...
cupertino_en_SG.arb Loading commit data...
cupertino_en_ZA.arb Loading commit data...
cupertino_es.arb Loading commit data...
cupertino_es_419.arb Loading commit data...
cupertino_es_AR.arb Loading commit data...
cupertino_es_BO.arb Loading commit data...
cupertino_es_CL.arb Loading commit data...
cupertino_es_CO.arb Loading commit data...
cupertino_es_CR.arb Loading commit data...
cupertino_es_DO.arb Loading commit data...
cupertino_es_EC.arb Loading commit data...
cupertino_es_GT.arb Loading commit data...
cupertino_es_HN.arb Loading commit data...
cupertino_es_MX.arb Loading commit data...
cupertino_es_NI.arb Loading commit data...
cupertino_es_PA.arb Loading commit data...
cupertino_es_PE.arb Loading commit data...
cupertino_es_PR.arb Loading commit data...
cupertino_es_PY.arb Loading commit data...
cupertino_es_SV.arb Loading commit data...
cupertino_es_US.arb Loading commit data...
cupertino_es_UY.arb Loading commit data...
cupertino_es_VE.arb Loading commit data...
cupertino_et.arb Loading commit data...
cupertino_eu.arb Loading commit data...
cupertino_fa.arb Loading commit data...
cupertino_fi.arb Loading commit data...
cupertino_fil.arb Loading commit data...
cupertino_fr.arb Loading commit data...
cupertino_fr_CA.arb Loading commit data...
cupertino_gl.arb Loading commit data...
cupertino_gsw.arb Loading commit data...
cupertino_gu.arb Loading commit data...
cupertino_he.arb Loading commit data...
cupertino_hi.arb Loading commit data...
cupertino_hr.arb Loading commit data...
cupertino_hu.arb Loading commit data...
cupertino_hy.arb Loading commit data...
cupertino_id.arb Loading commit data...
cupertino_is.arb Loading commit data...
cupertino_it.arb Loading commit data...
cupertino_ja.arb Loading commit data...
cupertino_ka.arb Loading commit data...
cupertino_kk.arb Loading commit data...
cupertino_km.arb Loading commit data...
cupertino_kn.arb Loading commit data...
cupertino_ko.arb Loading commit data...
cupertino_ky.arb Loading commit data...
cupertino_lo.arb Loading commit data...
cupertino_lt.arb Loading commit data...
cupertino_lv.arb Loading commit data...
cupertino_mk.arb Loading commit data...
cupertino_ml.arb Loading commit data...
cupertino_mn.arb Loading commit data...
cupertino_mr.arb Loading commit data...
cupertino_ms.arb Loading commit data...
cupertino_my.arb Loading commit data...
cupertino_nb.arb Loading commit data...
cupertino_ne.arb Loading commit data...
cupertino_nl.arb Loading commit data...
cupertino_no.arb Loading commit data...
cupertino_or.arb Loading commit data...
cupertino_pa.arb Loading commit data...
cupertino_pl.arb Loading commit data...
cupertino_pt.arb Loading commit data...
cupertino_pt_PT.arb Loading commit data...
cupertino_ro.arb Loading commit data...
cupertino_ru.arb Loading commit data...
cupertino_si.arb Loading commit data...
cupertino_sk.arb Loading commit data...
cupertino_sl.arb Loading commit data...
cupertino_sq.arb Loading commit data...
cupertino_sr.arb Loading commit data...
cupertino_sr_Latn.arb Loading commit data...
cupertino_sv.arb Loading commit data...
cupertino_sw.arb Loading commit data...
cupertino_ta.arb Loading commit data...
cupertino_te.arb Loading commit data...
cupertino_th.arb Loading commit data...
cupertino_tl.arb Loading commit data...
cupertino_tr.arb Loading commit data...
cupertino_uk.arb Loading commit data...
cupertino_ur.arb Loading commit data...
cupertino_uz.arb Loading commit data...
cupertino_vi.arb Loading commit data...
cupertino_zh.arb Loading commit data...
cupertino_zh_HK.arb Loading commit data...
cupertino_zh_TW.arb Loading commit data...
cupertino_zu.arb Loading commit data...
generated_cupertino_localizations.dart Loading commit data...
generated_date_localizations.dart Loading commit data...
generated_material_localizations.dart Loading commit data...
generated_widgets_localizations.dart Loading commit data...
material_af.arb Loading commit data...
material_am.arb Loading commit data...
material_ar.arb Loading commit data...
material_as.arb Loading commit data...
material_az.arb Loading commit data...
material_be.arb Loading commit data...
material_bg.arb Loading commit data...
material_bn.arb Loading commit data...
material_bs.arb Loading commit data...
material_ca.arb Loading commit data...
material_cs.arb Loading commit data...
material_cy.arb Loading commit data...
material_da.arb Loading commit data...
material_de.arb Loading commit data...
material_de_CH.arb Loading commit data...
material_el.arb Loading commit data...
material_en.arb Loading commit data...
material_en_AU.arb Loading commit data...
material_en_CA.arb Loading commit data...
material_en_GB.arb Loading commit data...
material_en_IE.arb Loading commit data...
material_en_IN.arb Loading commit data...
material_en_NZ.arb Loading commit data...
material_en_SG.arb Loading commit data...
material_en_ZA.arb Loading commit data...
material_es.arb Loading commit data...
material_es_419.arb Loading commit data...
material_es_AR.arb Loading commit data...
material_es_BO.arb Loading commit data...
material_es_CL.arb Loading commit data...
material_es_CO.arb Loading commit data...
material_es_CR.arb Loading commit data...
material_es_DO.arb Loading commit data...
material_es_EC.arb Loading commit data...
material_es_GT.arb Loading commit data...
material_es_HN.arb Loading commit data...
material_es_MX.arb Loading commit data...
material_es_NI.arb Loading commit data...
material_es_PA.arb Loading commit data...
material_es_PE.arb Loading commit data...
material_es_PR.arb Loading commit data...
material_es_PY.arb Loading commit data...
material_es_SV.arb Loading commit data...
material_es_US.arb Loading commit data...
material_es_UY.arb Loading commit data...
material_es_VE.arb Loading commit data...
material_et.arb Loading commit data...
material_eu.arb Loading commit data...
material_fa.arb Loading commit data...
material_fi.arb Loading commit data...
material_fil.arb Loading commit data...
material_fr.arb Loading commit data...
material_fr_CA.arb Loading commit data...
material_gl.arb Loading commit data...
material_gsw.arb Loading commit data...
material_gu.arb Loading commit data...
material_he.arb Loading commit data...
material_hi.arb Loading commit data...
material_hr.arb Loading commit data...
material_hu.arb Loading commit data...
material_hy.arb Loading commit data...
material_id.arb Loading commit data...
material_is.arb Loading commit data...
material_it.arb Loading commit data...
material_ja.arb Loading commit data...
material_ka.arb Loading commit data...
material_kk.arb Loading commit data...
material_km.arb Loading commit data...
material_kn.arb Loading commit data...
material_ko.arb Loading commit data...
material_ky.arb Loading commit data...
material_lo.arb Loading commit data...
material_lt.arb Loading commit data...
material_lv.arb Loading commit data...
material_mk.arb Loading commit data...
material_ml.arb Loading commit data...
material_mn.arb Loading commit data...
material_mr.arb Loading commit data...
material_ms.arb Loading commit data...
material_my.arb Loading commit data...
material_nb.arb Loading commit data...
material_ne.arb Loading commit data...
material_nl.arb Loading commit data...
material_no.arb Loading commit data...
material_or.arb Loading commit data...
material_pa.arb Loading commit data...
material_pl.arb Loading commit data...
material_ps.arb Loading commit data...
material_pt.arb Loading commit data...
material_pt_PT.arb Loading commit data...
material_ro.arb Loading commit data...
material_ru.arb Loading commit data...
material_si.arb Loading commit data...
material_sk.arb Loading commit data...
material_sl.arb Loading commit data...
material_sq.arb Loading commit data...
material_sr.arb Loading commit data...
material_sr_Latn.arb Loading commit data...
material_sv.arb Loading commit data...
material_sw.arb Loading commit data...
material_ta.arb Loading commit data...
material_te.arb Loading commit data...
material_th.arb Loading commit data...
material_tl.arb Loading commit data...
material_tr.arb Loading commit data...
material_uk.arb Loading commit data...
material_ur.arb Loading commit data...
material_uz.arb Loading commit data...
material_vi.arb Loading commit data...
material_zh.arb Loading commit data...
material_zh_HK.arb Loading commit data...
material_zh_TW.arb Loading commit data...
material_zu.arb Loading commit data...
widgets_af.arb Loading commit data...
widgets_am.arb Loading commit data...
widgets_ar.arb Loading commit data...
widgets_as.arb Loading commit data...
widgets_az.arb Loading commit data...
widgets_be.arb Loading commit data...
widgets_bg.arb Loading commit data...
widgets_bn.arb Loading commit data...
widgets_bs.arb Loading commit data...
widgets_ca.arb Loading commit data...
widgets_cs.arb Loading commit data...
widgets_cy.arb Loading commit data...
widgets_da.arb Loading commit data...
widgets_de.arb Loading commit data...
widgets_de_CH.arb Loading commit data...
widgets_el.arb Loading commit data...
widgets_en.arb Loading commit data...
widgets_en_AU.arb Loading commit data...
widgets_en_CA.arb Loading commit data...
widgets_en_GB.arb Loading commit data...
widgets_en_IE.arb Loading commit data...
widgets_en_IN.arb Loading commit data...
widgets_en_NZ.arb Loading commit data...
widgets_en_SG.arb Loading commit data...
widgets_en_ZA.arb Loading commit data...
widgets_es.arb Loading commit data...
widgets_es_419.arb Loading commit data...
widgets_es_AR.arb Loading commit data...
widgets_es_BO.arb Loading commit data...
widgets_es_CL.arb Loading commit data...
widgets_es_CO.arb Loading commit data...
widgets_es_CR.arb Loading commit data...
widgets_es_DO.arb Loading commit data...
widgets_es_EC.arb Loading commit data...
widgets_es_GT.arb Loading commit data...
widgets_es_HN.arb Loading commit data...
widgets_es_MX.arb Loading commit data...
widgets_es_NI.arb Loading commit data...
widgets_es_PA.arb Loading commit data...
widgets_es_PE.arb Loading commit data...
widgets_es_PR.arb Loading commit data...
widgets_es_PY.arb Loading commit data...
widgets_es_SV.arb Loading commit data...
widgets_es_US.arb Loading commit data...
widgets_es_UY.arb Loading commit data...
widgets_es_VE.arb Loading commit data...
widgets_et.arb Loading commit data...
widgets_eu.arb Loading commit data...
widgets_fa.arb Loading commit data...
widgets_fi.arb Loading commit data...
widgets_fil.arb Loading commit data...
widgets_fr.arb Loading commit data...
widgets_fr_CA.arb Loading commit data...
widgets_gl.arb Loading commit data...
widgets_gsw.arb Loading commit data...
widgets_gu.arb Loading commit data...
widgets_he.arb Loading commit data...
widgets_hi.arb Loading commit data...
widgets_hr.arb Loading commit data...
widgets_hu.arb Loading commit data...
widgets_hy.arb Loading commit data...
widgets_id.arb Loading commit data...
widgets_is.arb Loading commit data...
widgets_it.arb Loading commit data...
widgets_ja.arb Loading commit data...
widgets_ka.arb Loading commit data...
widgets_kk.arb Loading commit data...
widgets_km.arb Loading commit data...
widgets_kn.arb Loading commit data...
widgets_ko.arb Loading commit data...
widgets_ky.arb Loading commit data...
widgets_lo.arb Loading commit data...
widgets_lt.arb Loading commit data...
widgets_lv.arb Loading commit data...
widgets_mk.arb Loading commit data...
widgets_ml.arb Loading commit data...
widgets_mn.arb Loading commit data...
widgets_mr.arb Loading commit data...
widgets_ms.arb Loading commit data...
widgets_my.arb Loading commit data...
widgets_nb.arb Loading commit data...
widgets_ne.arb Loading commit data...
widgets_nl.arb Loading commit data...
widgets_no.arb Loading commit data...
widgets_or.arb Loading commit data...
widgets_pa.arb Loading commit data...
widgets_pl.arb Loading commit data...
widgets_ps.arb Loading commit data...
widgets_pt.arb Loading commit data...
widgets_pt_PT.arb Loading commit data...
widgets_ro.arb Loading commit data...
widgets_ru.arb Loading commit data...
widgets_si.arb Loading commit data...
widgets_sk.arb Loading commit data...
widgets_sl.arb Loading commit data...
widgets_sq.arb Loading commit data...
widgets_sr.arb Loading commit data...
widgets_sr_Latn.arb Loading commit data...
widgets_sv.arb Loading commit data...
widgets_sw.arb Loading commit data...
widgets_ta.arb Loading commit data...
widgets_te.arb Loading commit data...
widgets_th.arb Loading commit data...
widgets_tl.arb Loading commit data...
widgets_tr.arb Loading commit data...
widgets_uk.arb Loading commit data...
widgets_ur.arb Loading commit data...
widgets_uz.arb Loading commit data...
widgets_vi.arb Loading commit data...
widgets_zh.arb Loading commit data...
widgets_zh_HK.arb Loading commit data...
widgets_zh_TW.arb Loading commit data...
widgets_zu.arb Loading commit data...