Last Comment Bug 752131 - [AccessFu] Do not return empty string elements in utterances
: [AccessFu] Do not return empty string elements in utterances
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86_64 Linux
-- normal (vote)
: mozilla15
Assigned To: Eitan Isaacson [:eeejay]
: alexander :surkov
Depends on:
  Show dependency treegraph
Reported: 2012-05-04 18:51 PDT by Eitan Isaacson [:eeejay]
Modified: 2012-05-07 18:13 PDT (History)
2 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Remove empty strings from utterances. (3.62 KB, patch)
2012-05-04 19:27 PDT, Eitan Isaacson [:eeejay]
dbolter: review+
Details | Diff | Splinter Review

Description User image Eitan Isaacson [:eeejay] 2012-05-04 18:51:14 PDT
Originally I chose to not filter out empty strings from utterances. With the thought that ATs could have some understanding about how the utterance is constructed and modify their presentation. For example on a focus event, strings in odd indexes are names or values, strings in even indexes are roles or descriptions.

The problem is that it seems like TalkBack delimits each element from the utterance with spaces, so if you land on plain text, and the utterance (in Android it is AccessibilityEvent.getText()) would be ['', 'some text']. This would be sent to the TTS as ' some text'. the preceding whitespace delays the speech, so users get a laggy experience (well a more laggy experience :)
Comment 1 User image Eitan Isaacson [:eeejay] 2012-05-04 19:27:22 PDT
Created attachment 621234 [details] [diff] [review]
Remove empty strings from utterances.

This should do it. Nothing too fancy.

It feels liberating not to have to return two elements each time. I might suggest later on not clumping roles and states into the previous "description" element and to have them seperate. This introduces interesting questions about the grammar boundaries, and how things should be localized.
Comment 2 User image David Bolter [:davidb] 2012-05-05 06:11:41 PDT
I want to go over some high level stuff with you before review (probably Monday).
Comment 3 User image Eitan Isaacson [:eeejay] 2012-05-07 11:24:08 PDT
Comment 4 User image Ryan VanderMeulen [:RyanVM] 2012-05-07 18:13:45 PDT

Note You need to log in before you can comment on or make changes to this bug.