Accessibility Updates for Q2 2025
Craft CMS · July 9, 2025
About this announcement
Image Editor updatesIn 5.8, we’ve added full keyboard and screen reader support for image cropping.How it worksTo crop an image with the keyboard, you must be inside the Crop tab panel in the Image Editor.Use the Tab key to navigate through the interface. When you tab past the constraints radio group, you will be able to tab through the cropping controls.Press Space or Enter to pick up either the entire cropping rectangle or a single handle.Picking up the cropping rectangle allows you to move the crop placement. Alternatively, picking up a handle allows you to resize the cropping rectangle.Use the directional keys to move or resize the cropping rectangle.Press Space or Enter—or tab to the next item—to drop the item in place.Accessibility considerationsHTML <canvas> elements are notoriously tricky when it comes to accessibility. Canvases allow you to draw 2D content to your heart’s content. But to make canvas contents accessible, you have to be intentional about providing fallback content.For more information about making canvas contents accessible, see Paul J. Adam’s page on HTML canvas AccessibilityBefore this update, the only way to crop an image was to hover a “grab” point on the cropping rectangle and hold the mouse down to drag it across the canvas.This worked well for most mouse users. But to make it accessible to keyboard and screen reader users, we had to consider:How to make the interaction possible for keyboard usersHow to convey the related information (instructions, positioning, etc.) to assistive technology usersVisible focusThe cropping rectangle and handles need visible focus outlines to be keyboard-accessible. Using native HTML elements as a fallback to canvas content helps us with that.First, we explored the Salesforce drag-and-drop pattern for interacting with a canvas. This pattern lets keyboard users move items around a 2D space by activating “handles.” The handles use native buttons, and activating one lets you move an item using the keyboard on
Read Full Story