Skip to content

Accessibility of window.opener navigation #5464

Open
@matatk

Description

@matatk

A pop-up window can use window.opener to navigate the page that opened it. This could be used, for example, by a help pop-up in a web app to redirect the user to a different part of the app.

Problem

Screen readers do not announce when navigation has occurred in the original window, meaning that if the user can't see the screen, they won't know it happened.

As an aside: when I was testing (the procedure and results can be found below), I found that the pop-up could not control the original page if the user explicitly chose to open it in a new tab/window. This was surprising to me, but appears to be relatively long-standing and by design.

Suggestion

I think the main problem is awareness, hence I suggest tweaking the part of the spec that covers this technique...

We could amend the opener example in the spec to show web authors/developers how (and why) to make it clear to users where the navigation will happen. This would help by managing the expectations of people who can't see the screen. We could tweak the example and/or add an explanatory note.

If you think it is appropriate to add such clarifications, I'd be happy to make a PR.

Blue sky thought (beyond the scope of the spec): we could look in to the feasibility of relaying opener navigation events to assistive technologies, though my expectation is that this would not be practicable.

Background info

Test procedure

  1. Visit the start page for the test.

  2. Open the link in the start page to bring up the pop-up.

    • Try opening the link normally. (Current browsers open links with target="_blank" in a new tab instead of a new window.)

    • Try actively choosing to open the link in a new tab or window.

  3. Activate the button in the pop-up, to navigate away from the start page in its window.

  4. With a screen reader running, note whether the navigation is announced.

Test results

When following the pop-up link normally

Is there an announcement when the button is used to navigate the opening page?

Browser NVDA 2019.3.1 JAWS 2019.1912.1 VoiceOver (Mac)
IE 11 No announcement No announcement -
Firefox 75 No announcement No announcement -
Chrome 81 No announcement No announcement -
Safari 13.1 - - No announcement

Tests were run on Windows 10 version 1909 and macOS Catalina 10.15.4.

When explicitly opening the pop-up link in a new tab/window

The pop-up page could not control the location of its opener.

Related bits

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.accessibilityAffects accessibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions