Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tolking
Copy link
Member

@tolking tolking commented Sep 20, 2025

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.
  1. Refactoring the hue-slider component and improving accessibility features
  2. Add Home End PageDown PageUp key to control slider position
  3. Add a prompt for the current color when using the screen reader

The hue slider is opposite in direction to the regular slider.

When controlled through the keyboard, I manually reverse it. But there will still be unreasonable behavior (press the ArrowUp key, but the value decreases).

Perhaps only by changing the design can this issue be completely fixed.

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/element-plus/element-plus@22258

commit: c49be65

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

Size Change: +273 B (+0.02%)

Total Size: 1.55 MB

Filename Size Change
./dist/element-plus/dist/index.full.js 440 kB +134 B (+0.03%)
./dist/element-plus/dist/index.full.min.js 318 kB -21 B (-0.01%)
./dist/element-plus/dist/index.full.min.mjs 312 kB +23 B (+0.01%)
./dist/element-plus/dist/index.full.mjs 432 kB +137 B (+0.03%)
ℹ️ View Unchanged
Filename Size
./dist/element-plus/dist/index.css 46 kB

compressed-size-action

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

🧪 Playground Preview: https://element-plus.run/?pr=22258
Please comment the example via this playground if needed.

@tolking tolking changed the title feat(components): [color-picker] hue-slider a11y feat(components): [color-picker-panel] hue-slider a11y Sep 20, 2025
@btea btea requested a review from Copilot October 14, 2025 07:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the color picker panel's hue slider component with accessibility features and keyboard navigation improvements. The changes refactor the hue slider to use a shared slider composable with the alpha slider and add comprehensive keyboard support.

  • Refactored hue slider to use shared useSlider composable for consistency
  • Added keyboard navigation with Home, End, PageUp, PageDown keys for precise color control
  • Enhanced accessibility with proper ARIA attributes and screen reader support for current color announcements

Reviewed Changes

Copilot reviewed 73 out of 73 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/locale/lang/*.ts Added new localization keys for hue slider accessibility labels and descriptions
packages/components/color-picker-panel/src/props/slider.ts Consolidated slider props and types for both alpha and hue sliders
packages/components/color-picker-panel/src/composables/use-slider.ts Refactored into generic slider composable supporting both alpha and hue sliders
packages/components/color-picker-panel/src/components/hue-slider.vue Complete rewrite using new composable with accessibility improvements
packages/components/color-picker-panel/src/components/alpha-slider.vue Updated to use refactored composables and added accessibility features
packages/components/color-picker-panel/src/utils/draggable.ts Removed preventDefault call to fix focus issues
packages/components/color-picker-panel/src/tests/color-picker-panel.test.tsx Added test for hue slider keyboard navigation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tolking tolking merged commit 0842235 into dev Oct 14, 2025
16 of 19 checks passed
@tolking tolking deleted the feat/color-hue-slider branch October 14, 2025 11:06
@element-bot element-bot mentioned this pull request Oct 17, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants