Commit Graph

14 Commits

Author SHA1 Message Date
Andrea Fercia
b43ddef0bc Accessibility: Improve the color picker UI accessibility, interaction, and generated markup.
- Refactors the UI controls around the Iris color picker to output valid and semantic markup
- Simplifies the way elements visibility gets toggled
- Properly associates the visually hidden label with the color input field
- Makes the toggle button a real button
- Adds `aria-expanded` to the toggle button
- Keeps focus on the toggle button instead of moving it to the color input field
- Adds `aria-label` attributes to give better context to some controls
- Removes a redundant title attribute
- Keeps the toggle button text to "Select Color" instead of changing it to "Current Color" when a color is selected
- Slightly improves the responsive view
- CSS clean-up

Fixes #39662.

Built from https://develop.svn.wordpress.org/trunk@41329


git-svn-id: http://core.svn.wordpress.org/trunk@41160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:02:46 +00:00
Adam Silverstein
d856eda571 Docs: Improve JavaScript documentation in color-picker.js.
Add and improve JSDOC blocks.

Props carolinegeven, jjcomack, jipmoors.
Fixes #41063.



Built from https://develop.svn.wordpress.org/trunk@41264


git-svn-id: http://core.svn.wordpress.org/trunk@41104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 13:10:44 +00:00
Weston Ruter
8d1cb3068a Customize: Add hue-only mode to color picker.
The color control in the customizer can use the new mode by supplying the `mode` param with `hue` (as opposed to the new default `full` value). New control replaces the `range` control in Twenty Seventeen for `colorscheme_hue`. The `wpColorPicker` can opt for hue-only mode via supplying `hue` as the `type` option. Iris Color Picker is updated from v1.0.7 to v1.1.0-beta.

Props mattwiebe, celloexpressions.
Fixes #38263.

Built from https://develop.svn.wordpress.org/trunk@38931


git-svn-id: http://core.svn.wordpress.org/trunk@38874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:33:30 +00:00
Scott Taylor
a31d7e37dc Color Picker: when opening and closing, toggle a wp-picker-active class on the wrapper.
Props norcross.
Fixes #29471.

Built from https://develop.svn.wordpress.org/trunk@35099


git-svn-id: http://core.svn.wordpress.org/trunk@35064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 01:08:25 +00:00
Dominik Schilling
b8bfbf42e6 Color Picker: Allow to override mode and width values for Iris via wpColorPicker options.
props jtsternberg.
fixes #30182.
Built from https://develop.svn.wordpress.org/trunk@30330


git-svn-id: http://core.svn.wordpress.org/trunk@30329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-13 12:34:23 +00:00
Andrew Ozz
0fbefeaaf9 Fix support for the hide option in wpColorPicker, props tollmanz, fixes #29632
Built from https://develop.svn.wordpress.org/trunk@29879


git-svn-id: http://core.svn.wordpress.org/trunk@29636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-12 00:51:18 +00:00
Helen Hou-Sandí
e51fdf9d7d Focus styling: bring the blue glow to more places.
Handles color picker, theme browser, help/screen options, TinyMCE dialog buttons, jQuery UI dialog buttons, and buttons in color schemes.

props avryl, celloexpressions. fixes #28267.

Built from https://develop.svn.wordpress.org/trunk@29616


git-svn-id: http://core.svn.wordpress.org/trunk@29390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 05:17:17 +00:00
Dominik Schilling
e6644720f9 Color Picker: Close color picker when clicking outside of them and when opening another one.
props mattwiebe.
fixes #25539.
Built from https://develop.svn.wordpress.org/trunk@28239


git-svn-id: http://core.svn.wordpress.org/trunk@28067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-02 11:18:15 +00:00
Andrew Nacin
1674d350aa Fix order, declaration, tabbing of vars in color-picker.js.
props kadamwhite.
fixes #25877.

Built from https://develop.svn.wordpress.org/trunk@26074


git-svn-id: http://core.svn.wordpress.org/trunk@25994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-10 02:43:10 +00:00
Andrew Nacin
8789532eb8 Avoid JSHint errors in color-picker.js. One var, single quotes, add missing semicolon, declare wpColorPickerL10n as global.
props jorbin.
fixes #25877.

Built from https://develop.svn.wordpress.org/trunk@26067


git-svn-id: http://core.svn.wordpress.org/trunk@25987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-09 21:29:09 +00:00
Andrew Nacin
ac621213df Update the Iris color picker to version 1.0.3, which stops using the deprecated jQuery.browser property.
props mattwiebe.
fixes #23484.



git-svn-id: http://core.svn.wordpress.org/trunk@23443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-16 17:44:41 +00:00
Andrew Nacin
23a7a49f59 Swatches for the color picker. Improves discoverability of colors especially when the picker is opened with a grayscale color. props mattwiebe. FIXES #21206.
git-svn-id: http://core.svn.wordpress.org/trunk@22457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 23:32:03 +00:00
Ryan Boren
1fc0104667 Restore keyboard accessibility to the color picker. Props lessbloat. see #21206
git-svn-id: http://core.svn.wordpress.org/trunk@22385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 23:00:15 +00:00
Andrew Nacin
0b6cf76853 New color picker, props mattwiebe. see #21206.
Replaces Farbtastic. May change further in response to user testing.



git-svn-id: http://core.svn.wordpress.org/trunk@22030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 01:57:38 +00:00