Read scroll bar information from value interface 36/257636/7
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>
Wed, 28 Apr 2021 14:16:47 +0000 (16:16 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Fri, 30 Apr 2021 10:24:24 +0000 (12:24 +0200)
Old implementation reads information by analyzing
widget structures. This causes problem with scroll
bar widget in nui library as this one may have
multiple "visual" elements that are inside containers.
As a result nui scroll bar widget always have two
children.

This problem was solved by using value interface to
inform screen-reader about number of visual elements
and position of selected one.

Change-Id: Ie2292bd6d80a274db5ee8751801e9b566de9e623

src/reading_composer.c

index 262b85e8d44ffd5cea19afacf053920295a9bf4e..110d5022b7a44ab52b79eb6aed5a391586e01b8f 100644 (file)
@@ -353,6 +353,10 @@ TIZEN_PROD_STATIC char *generate_description_trait(AtspiAccessibleReadingMateria
                                int child_count = rm->child_count;
                                int idx = rm->first_selected_child_index;
                                SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, child_count));
+                       } else if (!g_strcmp0(style, "pagecontrolbyvalue")) {
+                               int page_count = (int)rm->upper;
+                               int idx = (int)rm->value;
+                               SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, page_count));
                        } else {
                                ESAL(buf, _IGNORE_ON_TV("IDS_ACCS_TBBODY_SWIPE_RIGHT_OR_LEFT_WITH_ONE_FINGER_TO_SELECT_NEXT_OR_PREVIOUS_LETTER"));
                        }