Skip to content

Arbitrarily freeze what-intent while focused #123

Description

@warkentien2

Hi, @ten1seven

I would like to extend the Form field behavior — of a frozen what-intent while focused — to other elements.
At first, I created a hook, as you showed in #105.
But, it could be as simple as adding a data attribute, e.g.:

Updating:

const formInputs = ['button', 'input', 'select', 'textarea'];

to:

const formInputs = ['button', 'input', 'select', 'textarea', '[data-whatintent-target]'];
// usage
<RangeInputHandle data-whatintent-target />

Also, it would be great if [data-whatintent-target] didn't have to be inside a <form>.

Use case:
When controlling a video player by clicking the progress slider and then clicking the left and right arrows,
I don't want to see accessibility markers, which kick in as soon as html[data-whatintent="keyboard"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions