fengyuanchen / cropperjs

JavaScript image cropper.
https://fengyuanchen.github.io/cropperjs/
MIT License
12.87k stars 2.39k forks source link

Enhance Keyboard Accessibility in Cropper.js #1169

Open ChaimTW opened 2 months ago

ChaimTW commented 2 months ago

Description:

As per the upcoming WCAG regulations that will be mandatory for all digital products in the European Union starting in 2025, it is essential for our applications to be keyboard accessible to ensure inclusivity for all users, including those with disabilities. However, the current version of Cropper.js lacks keyboard accessibility features.

Requested feature:

  1. Tabbable Component: Enable tab navigation into the Cropper.js component for keyboard users, ensuring they can access and interact with its functionalities without relying solely on mouse input.
  2. Arrow Key Functionality: Allow users to use arrow keys to navigate and adjust the top, left, bottom, and right boundaries of the cropping area within the Cropper.js component.

Expected outcome:

  1. Improved accessibility for users who rely on keyboard navigation.
  2. Compliance with WCAG regulations and enhanced inclusivity for all users.

Sources of inspiration:

Note: I understand the importance of maintaining compatibility and performance while implementing these changes, and I am open to discussing potential implementation strategies or collaborating on this enhancement.

Thank in advance!

WebMechanic commented 2 months ago

I like the demo app implementation. very intuitive !