Skip to content
Unverified Commit c304c945 authored by Joanmarie Diggs's avatar Joanmarie Diggs
Browse files

Fix repetition of text elements during SayAll in web content

If a single space (e.g. in a paragraph) separates two other objects
(e.g. links), instead of speaking the space we might speak a different
part of that same text element. The reason why is that currentLineText
prefers the existing substring if it exists (in this case it does, the
space). But in the case of non-editable content, it then strips that
substring and only returns the result if a result remains (it no longer
does). If getting the substring fails, we fall back on getTextLineAtCaret
which can lead to repetition of text.

Stripping the substring was a carry-over from old Gecko support and has
been around for 8+ years, likely to work around some oddity in Gecko's
accessible text implementation. Gecko's accessible text implementation
has improved quite a bit since then, so with any luck stripping the
string is no longer needed. Therefore, solve the repetition by no
longer stripping the string.

A side effect of the above fix was that we would speak "space" for the
space. This is due to speechdispatcherfactory's _speak calling
adjustForPronunciation which, among other things, converts a single
character (i.e. to be spoken alone) into its character name. In the
case of SayAll, we're not really speaking the space alone and we don't
want to make that adjustment. So have adjustForPronunciation not turn
single characters into their names during SayAll.

Fixes issue #273.
parent 09ecde9c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment