Closed Bug 2090947 Opened 17 days ago Closed 12 days ago

[Fenix][A11y] Request focus be placed in the browser after adding signature to pick up browser events

Categories

(GeckoView :: PDF Viewer, defect)

All
Android
defect
Points:
2

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: olivia, Assigned: olivia, NeedInfo)

References

(Blocks 2 open bugs)

Details

(Keywords: access, Whiteboard: [fxdroid][group6])

Attachments

(1 external file)

This ticket is to meet:

From bug 2086581 Comment 5:

While TalkBack is active, activating the "Add" button in the "Add a signature" dialog causes the TalkBack focus to be set to the "Site Information" element in the top left corner of the screen. A more logical place to set the focus to is the signature element, so that the user can immediately begin moving or resizing it. https://www.w3.org/TR/WCAG22/#focus-order

This ticket is split off of bug 2084956.

So, when Calixte was investigating bug 2084956, he determined a .focus() call to the signature was not being respected. It is because focus isn't explicitly moved to browser content after placing the signature.

On the Android side the ideal focus order should be:

  • Focus on "Add" button
  • Focus shifts to wait state "Adding signature"
  • Focus to browser content to hear the .focus call of the signature being placed
    • It appears that if the browser content does not have screenreader focus in Android, the JS calls like .focus() are not heard by TalkBack

I did initial testing and moving the focus should fix the issue. The only complication is ideally the screen reader reads the "Adding signature" moment.

Assignee: nobody → ohall
Blocks: 2086581

Hi :eeejay,

I wanted to double check something with you.

This feature is for adding user typed signatures to a PDF document in Android:

  • It has Fenix "Add" a signature to a PDF using Fenix native UI
  • When the signature is placed in PDF.js, in the browser, PDF.js has a .focus() script call
  • If the user does not have the browser window in focus (as in this case, they just left the native UI and focus seems to just get put somewhere when the dialog closes), then TalkBack doesn't seem to respond and naturally move focus to the signature that requested .focus()
    • TalkBack responds and moves fine if I add a container.pageContent?.requestFocus() that moves focus to the browser just before making the add signature request

I wanted to double check that it is expected for TalkBack to not move on this .focus() call when the browser window isn't already explicitly focused by the screenreader. Some of the history I found was in bug 1535701 made me think this was expected behavior.

Mostly just trying to get a sense if doing a simple container.pageContent?.requestFocus() at the right moment is a reasonable long-term solution and not me working around something deeper.

Flags: needinfo?(eitan)

This patch makes sure that focus is placed on the browser so it catches the signature focus() state. A wait state is added to ensure the processing button is saw by the screenreader first for a smoother experience.

Pushed by ohall@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98a3f1d552b1 https://hg.mozilla.org/integration/autoland/rev/914df8f8ec5a Request focus be placed in the browser after adding signature to pick up browser events r=android-reviewers,jonalmeida
Status: NEW → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: