summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2020-04-07 20:23:46 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2020-04-07 20:23:46 +0900
commitea75b6913455c28eb54c74af2f4e461266aed6f8 (patch)
tree93f109ed01aa8ac31e072d01fb12a6e0884e761d
parentf47371330a6d031a7421cb560511767a3a87a625 (diff)
elm_entry, accessibility: Send utf8 text instead of markup to ATSPI client
Summary: Markup text cannot be read as per expectation by a text to speech engine, hence send text in UTF8 format Test Plan: Test the text returned by connecting to object:text-changed:insert and object:text-changed:delete events in ATSPI-clients Reviewers: kimcinoo Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11660
-rw-r--r--src/lib/elementary/elm_entry.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 60008e6326..af8445b432 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2263,17 +2263,19 @@ _entry_changed_user_signal_cb(void *data,
2263 Efl_Access_Text_Change_Info atspi_info; 2263 Efl_Access_Text_Change_Info atspi_info;
2264 if (edje_info && edje_info->insert) 2264 if (edje_info && edje_info->insert)
2265 { 2265 {
2266 atspi_info.content = edje_info->change.insert.content; 2266 atspi_info.content = elm_entry_markup_to_utf8(edje_info->change.insert.content);
2267 atspi_info.pos = edje_info->change.insert.pos; 2267 atspi_info.pos = edje_info->change.insert.pos;
2268 atspi_info.len = edje_info->change.insert.plain_length; 2268 atspi_info.len = edje_info->change.insert.plain_length;
2269 efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); 2269 efl_access_object_event_emit(data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info);
2270 free((void *)atspi_info.content);
2270 } 2271 }
2271 else if (edje_info && !edje_info->insert) 2272 else if (edje_info && !edje_info->insert)
2272 { 2273 {
2273 atspi_info.content = edje_info->change.del.content; 2274 atspi_info.content = elm_entry_markup_to_utf8(edje_info->change.del.content);
2274 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end); 2275 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end);
2275 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos; 2276 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos;
2276 efl_access_object_event_emit( data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info); 2277 efl_access_object_event_emit(data, EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info);
2278 free((void *)atspi_info.content);
2277 } 2279 }
2278 } 2280 }
2279} 2281}