Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Constrain Focus on Color Picker Dialog #87

Closed
gautamo opened this issue Feb 27, 2023 · 6 comments
Closed

Feature Request: Constrain Focus on Color Picker Dialog #87

gautamo opened this issue Feb 27, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@gautamo
Copy link

gautamo commented Feb 27, 2023

Hi, would it be possible to constrain the focus on the color picker dialog when it is opened. This way, using the tab key will continue to cycle through the color picker dialog options until either the escape key is clicked or close button is selected using the keyboard.

@melloware
Copy link
Contributor

Not a bad idea. It's usually referred to as a "focus trap" when you want to keep the focus inside the popup while it's open.

@mdbassit
Copy link
Owner

That's actually a bad idea for accessibility. The color picker dialog is not a modal, you can still interact with the rest of the page while it's open. Using a focus trap means users using keyboard only navigation will have less access to the page and the browser controls than users using a mouse/touchpad.

@Ani-Soft
Copy link

Ani-Soft commented Mar 4, 2023

Hi, Is there anyway to set color on already initiated colorpicker instance ?
Something like setColor() or updateColor() etc.

@mdbassit
Copy link
Owner

mdbassit commented Mar 6, 2023

Hi, Is there anyway to set color on already initiated colorpicker instance ? Something like setColor() or updateColor() etc.

Could you please create a separate issue please? Your question is unrelated to this one!
Are you using the color picker in normal or inline mode?

@melloware
Copy link
Contributor

Done: #91

This ticket can be closed.

@mdbassit mdbassit closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
@mdbassit
Copy link
Owner

I'm reopening this because I've been talking to a few accessibility experts and they made a compelling argument that a focus trap can improve accessibility if implemented properly.

@mdbassit mdbassit reopened this Apr 13, 2023
Repository owner deleted a comment from melloware Apr 13, 2023
@mdbassit mdbassit added the enhancement New feature or request label Apr 13, 2023
@mdbassit mdbassit self-assigned this Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants