#22475 closed defect (bug) (fixed)
Color picker accessibility
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | 3.5 |
| Component: | Accessibility | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | mattwiebe, kovshenin |
Description (last modified by SergeyBiryukov)
In ticket:21206:79 the extra controls at the edge of the square were removed. Unfortunately, now there is no way for keyboard users to move the main color selector puck.
Attachments (4)
Change History (25)
comment:2
SergeyBiryukov — 6 months ago
- Description modified (diff)
- Owner set to mattwiebe
- Status changed from new to assigned
Hopefully someone else jumps on this first if they are inclined and able. Assigning to mattwiebe with the hope is able to take responsibility for this otherwise.
Added keyboard events for main color selector puck in: 22475.diff
mattwiebe, mind helping me package this up? I tried to minify it, but I think I failed...
Can you patch https://github.com/Automattic/Iris directly? Would be much easier than tinkering with minification :-)
Replying to nacin:
Can you patch https://github.com/Automattic/Iris directly? Would be much easier than tinkering with minification :-)
He was having issues with my non-documentation over there. :( We hashed it out. :)
iris-keys.diff refreshes lessbloat's patch, minifies it, and does a bit of styling of the puck when focused. Changelog:
* use up, down, right, left on puck when focused * multiply by 10 when using alt key * default :focus styles for the puck * keep :focus on the puck after clicking * remove vendor prefixes in CSS
iris-keys.diff seems to work well for me as far as the puck goes. Can we look at the palette, too? :)
Replying to helenyhou:
iris-keys.diff seems to work well for me as far as the puck goes. Can we look at the palette, too? :)
I believe @kovshenin worked on that in http://core.trac.wordpress.org/attachment/ticket/21283/21283.11.diff
comment:10
in reply to:
↑ 9
;
follow-up:
↓ 11
mattwiebe — 6 months ago
Replying to lessbloat:
I believe @kovshenin worked on that in http://core.trac.wordpress.org/attachment/ticket/21283/21283.11.diff
Looks mostly there. Trouble is that .iris-palette items are currently <li>s, so you won't get keyboard focus.
I'll bring it into Iris.
comment:11
in reply to:
↑ 10
;
follow-up:
↓ 12
lessbloat — 6 months ago
Replying to mattwiebe:
Looks mostly there. Trouble is that .iris-palette items are currently <li>s, so you won't get keyboard focus.
prop('tabindex', 0) seems to do the trick (making these <li> focusable).
comment:12
in reply to:
↑ 11
mattwiebe — 6 months ago
- Keywords has-patch added
Replying to lessbloat:
prop('tabindex', 0) seems to do the trick (making these <li> focusable).
Could be. Anyway, it belongs in Iris since that's where palettes live.
iris-keys-2.diff adds palette keyboard accessibility.
comment:13
nacin — 6 months ago
- Keywords commit added
Nice. Is there anything else needed after -2.diff?
comment:14
follow-up:
↓ 16
nacin — 6 months ago
multiply by 10 when using alt key
This only works up down, not left right. Chrome stable OS X.
comment:15
nacin — 6 months ago
In 22697:
comment:16
in reply to:
↑ 14
nacin — 6 months ago
Replying to nacin:
multiply by 10 when using alt key
This only works up down, not left right. Chrome stable OS X.
For some reason alt + control + left/right works. I am chalking it up to some kind of global shortcut on OS X, or something.
Only other thing I expressed in IRC was a nice-to-have that alt + arrow keys should max out, rather than stop short, which mattwiebe agreed.
comment:17
mattwiebe — 6 months ago
Just following up: Nacin's computer is possessed; nobody else can duplicate his issue.
Did discover that the "puck" and slider controls weren't keyboard focusable in Safari (but palettes are). Further investigation revealed nothing about why not (open to anyone who might know something).
But I did recall that Safari handles a lot of keyboard stuff "uniquely." Sure enough, Preferences –> Advanced has a "Press Tab to highlight each item on a webpage" option that defaults to off. Looks like they're using some type of internal algorithm to decide what's focusable when it's off. Enabling the option makes everything behave smoothly from the keyboard.
comment:18
nacin — 6 months ago
- Keywords has-patch commit removed
- Priority changed from normal to low
comment:19
mattwiebe — 6 months ago
- Keywords has-patch added
iris-keys-3.diff:
- Let's you use alt+arrows all the way to the edge
- Gives instant✝ feedback when typing a color in the text field (see #22388)
- Above required a lot of robustifying to the underlying color parser. Accepts hsl, rgb and hsv colors as a bonus. :)
✝ with a 150 ms debounce so things don't go all crazy
comment:20
nacin — 6 months ago
- Resolution set to fixed
- Status changed from assigned to closed
In 22732:
comment:21
kovshenin — 6 months ago
- Cc kovshenin added

Also see: 21283.11.diff for keyboard triggering of the default button and color palette.