efl_access_object: Support org.a11y.atspi.Value.Text property 12/291412/4
authorLukasz Oleksak <l.oleksak@samsung.com>
Fri, 14 Apr 2023 10:14:38 +0000 (12:14 +0200)
committerLukasz Oleksak <l.oleksak@samsung.com>
Mon, 17 Apr 2023 08:38:39 +0000 (08:38 +0000)
commit144116846d49035ea97ca3649a01e2b3381fd91e
treef0f203715cd866eb1f3c16b7da153a532bf362c4
parentac5c46c10df3708ec5e3292d6f698b31a5cf379c
efl_access_object: Support org.a11y.atspi.Value.Text property

The application may set the "value_format" attribute to one of the
following values in order to customize what is read by the Screen Reader:

    1. "percent" (the default) - current value normalized as a percentage
       of the range [minimum value, maximum value],
    2. "number" - current value verbatim
    3. "text" - customized textual representation is used instead of current value

Option "text" must be acompanied by registration of a callback that would provide
relevant textual representation of current value:

    efl_access_object_value_text_cb_set(slider, value_text_cb, NULL);
    efl_access_object_attribute_append(slider, "value_format", "text");

    static char *value_text_cb(void *data, Evas_Object *obj)
    {
        return strdup("This information is set by value text callback");
    }

@tizen_only

Change-Id: Ic0d544dc163dff20551dddbcfe92ffcbd1876541
src/lib/elementary/efl_access_object.c
src/lib/elementary/efl_access_object.eo
src/lib/elementary/efl_ui_widget.c
src/lib/elementary/elm_slider.c