Closed Bug 886074 Opened 11 years ago Closed 11 years ago

[AccessFu] Braille should update when editing

Categories

(Core :: Disability Access APIs, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: maxli, Assigned: maxli)

References

Details

Attachments

(1 file, 2 obsolete files)

The braille text should respond to text change events.
Blocks: 886075
Attached patch Patch (obsolete) — Splinter Review
This patch reveals a bug with respect to the caret navigation and editing, namely sometimes the caret moves visually but typing does not move it. I will investigate further.
Attachment #771066 - Flags: review?(eitan)
(In reply to Max Li [:maxli] from comment #1)
> This patch reveals a bug with respect to the caret navigation and editing,
> namely sometimes the caret moves visually but typing does not move it. I
> will investigate further.

Could this be similar to the fact that, when typing, TalkBack speaks all of the previously typed text as "deleted", and then sometimes also speaks all previously typed text again? As in: Every typed character causes all text to be removed and re-added to the widget we use for HTML input and textarea elements? I've never seen this behavior in other native Android widgets, not even our address bar. Could this be related?
Comment on attachment 771066 [details] [diff] [review]
Patch

Review of attachment 771066 [details] [diff] [review]:
-----------------------------------------------------------------

I think we got a lot of overhead here!

How about we refactor all the braille states into its own object that would be a member of Output. Maybe with a method called update(), that takes the new text and returns a brailleText structure like the one you put in Android events.

The object and its methods should be generic enough that we could use it outside of Android when the time comes.
Attachment #771066 - Flags: review?(eitan)
Attached patch Patch v2 (obsolete) — Splinter Review
Attachment #771066 - Attachment is obsolete: true
Attachment #772133 - Flags: review?(eitan)
Comment on attachment 772133 [details] [diff] [review]
Patch v2

Review of attachment 772133 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/jsat/AccessFu.jsm
@@ +505,4 @@
>        if (androidEvent.brailleText && 'output' in androidEvent.brailleText) {
> +        this.brailleState.startOffset = androidEvent.brailleText.startOffset;
> +        this.brailleState.endOffset = androidEvent.brailleText.endOffset;
> +        this.brailleState.text = androidEvent.brailleText.output;

Why isn't all this encapsulated in this.brailleState? It could be done in update().
(In reply to Eitan Isaacson [:eeejay] from comment #5)

> Why isn't all this encapsulated in this.brailleState? It could be done in
> update().

update() (at least as the patch is written currently) only gets called on text change events.
Attached patch Patch v3Splinter Review
Attachment #772133 - Attachment is obsolete: true
Attachment #772133 - Flags: review?(eitan)
Attachment #772348 - Flags: review?(eitan)
Comment on attachment 772348 [details] [diff] [review]
Patch v3

Review of attachment 772348 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #772348 - Flags: review?(eitan) → review+
https://hg.mozilla.org/mozilla-central/rev/ff0f3b303c66
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: