@@ -59,11 +59,16 @@ class _SingleInputDialogState extends State<SingleInputDialog> {
5959 onPressed: () => Navigator .pop (context),
6060 child: const Text ('Cancel' ),
6161 ),
62- TextButton (
63- onPressed: _controller.text.isEmpty
64- ? null
65- : () => Navigator .pop (context, _controller.text),
66- child: Text (widget.confirmLabel),
62+ Semantics (
63+ identifier: 'singleinput_confirm_button' ,
64+ container: true ,
65+ button: true ,
66+ child: TextButton (
67+ onPressed: _controller.text.isEmpty
68+ ? null
69+ : () => Navigator .pop (context, _controller.text),
70+ child: Text (widget.confirmLabel),
71+ ),
6772 ),
6873 ],
6974 );
@@ -77,7 +82,6 @@ class PairInputDialog extends StatefulWidget {
7782 final String valueLabel;
7883 final String ? keySemanticsLabel;
7984 final String ? valueSemanticsLabel;
80- final String ? confirmSemanticsLabel;
8185
8286 const PairInputDialog ({
8387 super .key,
@@ -86,7 +90,6 @@ class PairInputDialog extends StatefulWidget {
8690 this .valueLabel = 'Value' ,
8791 this .keySemanticsLabel,
8892 this .valueSemanticsLabel,
89- this .confirmSemanticsLabel,
9093 });
9194
9295 @override
@@ -148,8 +151,9 @@ class _PairInputDialogState extends State<PairInputDialog> {
148151 child: const Text ('Cancel' ),
149152 ),
150153 Semantics (
151- identifier: widget.confirmSemanticsLabel ?? 'confirm_button ' ,
154+ identifier: 'singlepair_confirm_button ' ,
152155 container: true ,
156+ button: true ,
153157 child: TextButton (
154158 onPressed: _isValid
155159 ? () => Navigator .pop (
@@ -283,6 +287,7 @@ class _MultiPairInputDialogState extends State<MultiPairInputDialog> {
283287 ],
284288 Semantics (
285289 identifier: 'multipair_add_row_button' ,
290+ container: true ,
286291 button: true ,
287292 child: TextButton .icon (
288293 onPressed: _addRow,
@@ -301,6 +306,7 @@ class _MultiPairInputDialogState extends State<MultiPairInputDialog> {
301306 ),
302307 Semantics (
303308 identifier: 'multipair_confirm_button' ,
309+ container: true ,
304310 button: true ,
305311 child: TextButton (
306312 onPressed: _allValid
@@ -374,69 +380,20 @@ class _MultiSelectRemoveDialogState extends State<MultiSelectRemoveDialog> {
374380 ),
375381 ),
376382 ),
377- actions: [
378- TextButton (
379- onPressed: () => Navigator .pop (context),
380- child: const Text ('Cancel' ),
381- ),
382- TextButton (
383- onPressed: _selected.isEmpty
384- ? null
385- : () => Navigator .pop (context, _selected.toList ()),
386- child: Text ('Remove (${_selected .length })' ),
387- ),
388- ],
389- );
390- }
391- }
392-
393- // Login dialog
394- class LoginDialog extends StatefulWidget {
395- const LoginDialog ({super .key});
396-
397- @override
398- State <LoginDialog > createState () => _LoginDialogState ();
399- }
400-
401- class _LoginDialogState extends State <LoginDialog > {
402- final _controller = TextEditingController ();
403-
404- @override
405- void dispose () {
406- _controller.dispose ();
407- super .dispose ();
408- }
409-
410- @override
411- Widget build (BuildContext context) {
412- return AlertDialog (
413- insetPadding: const EdgeInsets .symmetric (horizontal: 16 ),
414- title: const Text ('Login User' ),
415- content: SizedBox (
416- width: double .maxFinite,
417- child: Semantics (
418- identifier: 'login_user_id_input' ,
419- container: true ,
420- child: AppTextField (
421- controller: _controller,
422- decoration: const InputDecoration (labelText: 'External User Id' ),
423- onChanged: (_) => setState (() {}),
424- ),
425- ),
426- ),
427383 actions: [
428384 TextButton (
429385 onPressed: () => Navigator .pop (context),
430386 child: const Text ('Cancel' ),
431387 ),
432388 Semantics (
433- identifier: 'login_confirm_button ' ,
389+ identifier: 'multiselect_confirm_button ' ,
434390 container: true ,
391+ button: true ,
435392 child: TextButton (
436- onPressed: _controller.text .isEmpty
393+ onPressed: _selected .isEmpty
437394 ? null
438- : () => Navigator .pop (context, _controller.text ),
439- child: const Text ('Login ' ),
395+ : () => Navigator .pop (context, _selected. toList () ),
396+ child: Text ('Remove (${ _selected . length }) ' ),
440397 ),
441398 ),
442399 ],
@@ -490,20 +447,35 @@ class _OutcomeDialogState extends State<OutcomeDialog> {
490447 onChanged: (v) => setState (() { if (v != null ) _type = v; }),
491448 child: Column (
492449 children: [
493- RadioListTile <OutcomeType >(
494- title: const Text ('Normal Outcome' ),
495- value: OutcomeType .normal,
496- contentPadding: EdgeInsets .zero,
450+ Semantics (
451+ identifier: 'outcome_type_normal_radio' ,
452+ container: true ,
453+ button: true ,
454+ child: RadioListTile <OutcomeType >(
455+ title: const Text ('Normal Outcome' ),
456+ value: OutcomeType .normal,
457+ contentPadding: EdgeInsets .zero,
458+ ),
497459 ),
498- RadioListTile <OutcomeType >(
499- title: const Text ('Unique Outcome' ),
500- value: OutcomeType .unique,
501- contentPadding: EdgeInsets .zero,
460+ Semantics (
461+ identifier: 'outcome_type_unique_radio' ,
462+ container: true ,
463+ button: true ,
464+ child: RadioListTile <OutcomeType >(
465+ title: const Text ('Unique Outcome' ),
466+ value: OutcomeType .unique,
467+ contentPadding: EdgeInsets .zero,
468+ ),
502469 ),
503- RadioListTile <OutcomeType >(
504- title: const Text ('Outcome with Value' ),
505- value: OutcomeType .withValue,
506- contentPadding: EdgeInsets .zero,
470+ Semantics (
471+ identifier: 'outcome_type_value_radio' ,
472+ container: true ,
473+ button: true ,
474+ child: RadioListTile <OutcomeType >(
475+ title: const Text ('Outcome with Value' ),
476+ value: OutcomeType .withValue,
477+ contentPadding: EdgeInsets .zero,
478+ ),
507479 ),
508480 ],
509481 ),
@@ -795,9 +767,14 @@ class TooltipDialog extends StatelessWidget {
795767 ),
796768 ),
797769 actions: [
798- TextButton (
799- onPressed: () => Navigator .pop (context),
800- child: const Text ('OK' ),
770+ Semantics (
771+ identifier: 'tooltip_ok_button' ,
772+ container: true ,
773+ button: true ,
774+ child: TextButton (
775+ onPressed: () => Navigator .pop (context),
776+ child: const Text ('OK' ),
777+ ),
801778 ),
802779 ],
803780 );
0 commit comments