Skip to content

New markup for GrabDragInteraction to organize responses #945

Description

@jessegreenberg

The GrabDragInteraction has markup like this:

<button>Grab Me</button>

When pressed, that element is destroyed and becomes:

<div tabindex="0" role="application">Drag me</div>

This means that there is a focus change when switching between two elements. This causes thte screen reader to always read the name of the new element BEFORE any new grab/release responses.

In phetsims/membrane-transport#491 @terracoda said it would be beneficial to hear the grab/release response first sometimes.

With the current markup, that is not possible. HOwever, if we changed it to use one element (like a div) that changed its role between the grab/drag state, we would have more control over the output.

This issue is to investigate if that can work, and if it indeed gives us the output that we want.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions