Skip to main content

ColorGradient

The ColorGradient component enables intuitive color selection through canvas, sliders, or manual input of specific color values.

Accessibility Support

Out of the box, the Telerik and Kendo UI Colorgradient provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.

The Colorgradient is compliant with the Web Content Accessibility Guidelines (WCAG) 2.2 standards and Section 508 requirements, follows the Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA) best practices for implementing the keyboard navigation and provides options for managing its focus and is tested against the most popular screen readers.

ColorGradient

ARIA Attributes

AttributeDescription
role="textbox"The focusable wrapper should be considered a textbox with a value that could be submitted.
aria-label|aria-labelledbyThe component needs an accessible name including the currently selected value.
tabindex="0"The element must be focusable.
aria-disabled="true"Rendered only when the ColorGradient is disabled.
role="slider"The 2D draghandle must have slider role for ARIA-allowed attributes.
aria-orientation="undefined"The implicit orientation for the slider must be removed for the 2D handle.
aria-labelMust provide information about the purpose of the slider and the currently selected color.
aria-valuetextMust specify the values on both X and Y axis.
aria-valuenowRequired by the slider role.
aria-valueminRequired by the slider role.
aria-valuemaxRequired by the slider role.
aria-labelMust provide the name of the channel (red, green, blue, or alpha).

Keyboard Navigation

TriggerBehavior
EnterActivates inner ColorGradient navigation.
TabNavigates to the next focusable element on the page.
Shift + TabNavigates to the previous focusable element on the page.
EscapeMoves focus back to wrapper element. Deactivates inner ColorGradient navigation.
TabNavigates to the next focusable element in the ColorGradient. If current focus is on the last element, moves focus to the first focusable item in the component.
Shift + TabNavigates to the previous focusable element in the ColorGradient. If current focus is on the first element, moves focus to the last focusable item in the component.
EnterFor button items, ColorGradient executes the currently focused button action.
ArrowUpMoves slider up by large step.
ArrowDownMoves slider down by large step.
ArrowLeftMoves slider left by large step.
ArrowRightMoves slider right by large step.
Shift + ArrowUpMoves slider up by small step.
Shift + ArrowDownMoves slider down by small step.
Shift + ArrowLeftMoves slider left by small step.
Shift + ArrowRightMoves slider right by small step.

UX Behavior

FeatureDescription
Gradient canvasA 2D canvas lets the user pick a color by clicking or dragging.
Hue sliderA slider below the canvas adjusts the hue.
Opacity sliderA slider adjusts the alpha channel of the selected color.
Hex inputA text input accepts a hex color code directly.
RGBA inputsIndividual inputs accept red, green, blue, and alpha values.

Testing

The Colorgradient has been extensively tested automatically with axe-core and manually with the most popular screen readers.

Screen Readers

The Colorgradient has been tested with the following screen readers and browsers combinations:

EnvironmentTool
FirefoxNVDA
ChromeJAWS
Microsoft EdgeJAWS
Feedback