reading_composer: Added popup Alert sub-role handling 88/244988/4 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.124050 accepted/tizen/6.0/unified/hotfix/20201103.051437 accepted/tizen/unified/20201005.005855 submit/tizen/20201004.214201 submit/tizen_6.0/20201029.205101 submit/tizen_6.0_hotfix/20201102.192501 submit/tizen_6.0_hotfix/20201103.114801 tizen_6.0.m2_release
authorMaria Bialota <m.bialota@samsung.com>
Mon, 28 Sep 2020 18:04:29 +0000 (20:04 +0200)
committerMaria Bialota <m.bialota@samsung.com>
Tue, 29 Sep 2020 14:30:16 +0000 (16:30 +0200)
Change-Id: Ie76ef2029977a623d5fcb42154e16fc021d2c4cf

src/reading_composer.c

index 076bb1965f6ac80c84f972673795cd6b869a7a66..c731b897300559b824f36b4ab59d7e63fbda8731 100644 (file)
@@ -527,14 +527,28 @@ char* reading_composer_description_get(ReadingComposerData *data)
                return NULL;
        }
 
+       if((rm->role == ATSPI_ROLE_DIALOG) && (reading_attribute & ACCESSIBLE_READING_INFO_TYPE_ROLE)) {
+               GHashTable *hash_table = rm->attributes;
+               if (hash_table) {
+                       const char *sub_role = g_hash_table_lookup(hash_table, "sub-role");
+                       if (!g_strcmp0(sub_role, "Alert")) {
+                               DEBUG("Alert sub-role popup detected...");
+                               ESAL(buf, _("WDS_TTS_TBOPT_ALERT"));
+                       }
+               }
+       }
+
        if (reading_attribute & ACCESSIBLE_READING_INFO_TYPE_NAME) {
                DEBUG("START : ACCESSIBLE_READING_INFO_TYPE_NAME");
                name = rm->name;
                name_from_relation = rm->labeled_by_name;
                name_from_text_iface = rm->text_interface_name;
 
-               if (name && strlen(name) > 0)
+               if (name && strlen(name) > 0) {
+                       if (eina_strbuf_length_get(buf))
+                               ESAL(buf, ", ");
                        ESAL(buf, name);
+               }
                if (name_from_relation && strlen(name_from_relation) > 0) {
                        if (eina_strbuf_length_get(buf))
                                ESAL(buf, " , ");