[TV] make the handler of state-changed:checked event aware of live-region politeness 27/301727/1
authorLukasz Oleksak <l.oleksak@samsung.com>
Thu, 12 Oct 2023 14:57:39 +0000 (16:57 +0200)
committerChun <jykeon@samsung.com>
Wed, 22 Nov 2023 06:52:32 +0000 (06:52 +0000)
Change-Id: Ia045ddf5c80662b84db1b3dbce8be97df9f364b8
(cherry picked from commit 7545ac95eb88cd83e4872bb2c2869c1a6fe3ba03)

src/screen_reader_spi.c

index ebc7780322a3f8597d46a5832a7c7618cecc440c..948c185063f71cb72aa6ff53344711953e938907 100644 (file)
@@ -341,10 +341,15 @@ void spi_event_get_text_to_read(
                                *cancel = mode == ACCESSIBLE_LIVE_REGION_ASSERTIVE ? 1 : 0;
                }
        } else if (!g_strcmp0(event->type, STATE_CHECKED_SIG)) {
-               if (event->detail1)
-                       *text_to_read = g_strdup(_("IDS_ACCS_TBOPT_CHECKED_TTS"));
-               else
-                       *text_to_read = g_strdup(_("IDS_ACCS_TBOPT_NOT_CHECKED_TTS"));
+               Live_Region_Politeness mode = try_parse_politeness(attrs, object_has_focused_state(event->source));
+               if (mode != ACCESSIBLE_LIVE_REGION_OFF) {
+                       if (event->detail1)
+                               *text_to_read = g_strdup(_("IDS_ACCS_TBOPT_CHECKED_TTS"));
+                       else
+                               *text_to_read = g_strdup(_("IDS_ACCS_TBOPT_NOT_CHECKED_TTS"));
+                       if (cancel)
+                               *cancel = mode == ACCESSIBLE_LIVE_REGION_ASSERTIVE ? 1 : 0;
+               }
        } else if (!g_strcmp0(event->type, NAME_CHANGED_SIG)) {
                Live_Region_Politeness mode = try_parse_politeness(attrs, object_has_focused_state(event->source));
                if (mode != ACCESSIBLE_LIVE_REGION_OFF) {