Open Bug 1732980 Opened 3 years ago Updated 2 years ago

HyperTextAccessible::TextBounds should consider the visual viewport

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: morgan, Unassigned)

References

(Blocks 2 open bugs)

Details

By default, the coordinates we get from frames or from GetScreenRect are in the layout viewport coordinate space. When a user zooms with APZ, the visual viewport represents the rect of the page that is currently visible in their screen (a smaller rect than the original webarea).

Right now, we offset our bounds to the root frame of the doc the text is contained in (and we apply APZ scaling), but we don't add the pan offset (visual viewport offset).

I think this is an issue in a few other places, but documenting while I remember :)

Severity: -- → S3

Morgan, do you know if this is an issue with CTW?

Flags: needinfo?(mreschenberg)

Looks like this is still an issue -- STR:

  1. Load data:text/html,<p style="margin-top: 400px; margin-left: 300px;">hello world</p>
  2. pinch-zoom in a bit, keeping the text on screen
  3. attempt to focus with VO cursor

Expected:
VO wraps the text

Actual:
the VO cursor is unchanged from the text's original location

Not sure if we're just not notifying of text-bounds changes here, or if we aren't considering the viewport. Could be either :)

Flags: needinfo?(mreschenberg)
You need to log in before you can comment on or make changes to this bug.