Skip to content

feat: support aria-describedby on handles - #59110

Merged
yoyo837 merged 3 commits into
featurefrom
bump-slider
Aug 27, 2026
Merged

yoyo837 merged 3 commits into
featurefrom
bump-slider

Conversation

@yoyo837

@yoyo837 yoyo837 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature see feat: support aria-describedby on handles react-component/slider#1088
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English feat: support aria-describedby on handles
🇨🇳 Chinese feat: 支持为滑块手柄设置 aria-describedby

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

👁 Visual Regression Report for PR #59110 Failed ❌

🎯 Target branch: feature (6632feb)
⚠️ Baseline may be stale: no snapshot for the PR's base commit was found, so an older branch snapshot was used. Some diffs below may come from changes already merged into feature rather than this PR.
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 3 changed

Expected (Branch feature) Actual (Current PR) Diff
statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png
statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png
statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png

Important

There are 3 diffs found in this PR: 🔄 3 changed.
Please check all items:

  • Visual diff is acceptable
📖 中文报告

👁 PR #59110 视觉回归报告 失败 ❌

🎯 目标分支: feature (6632feb)
⚠️ 基线可能已过期: 未找到该 PR 基准提交对应的快照,因此回退使用了较旧的分支快照。下方部分差异可能来自已合并到 feature 的改动,而非本 PR。
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 概览: 🔄 3 变更

期望 (分支 feature) 实际 (当前 PR) 差异
statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png statistic-timer.compact.png
statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png statistic-timer.dark.png
statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png statistic-timer.default.png

[!NOTE]
本 PR 共发现 3 处差异:🔄 3 变更。请在上方英文报告中勾选确认项以通过 CI 校验。

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c95ed6a-c320-4cf0-b9fa-038042f4ea5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Preview is ready

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/antd.min.js 443.53 KB (+22 B 🔺)
dist/antd-with-locales.min.js 529.94 KB (+23 B 🔺)

@pkg-pr-new

pkg-pr-new Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
More templates

npm i https://pkg.pr.new/antd@59110

commit: 3ca9ff9

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c53a696e9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tabIndex?: SliderProps['tabIndex'];
ariaLabelForHandle?: SliderProps['ariaLabelForHandle'];
ariaLabelledByForHandle?: SliderProps['ariaLabelledByForHandle'];
ariaDescribedByForHandle?: SliderProps['ariaDescribedByForHandle'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the new handle-description prop

Developers using the published Slider API cannot discover ariaDescribedByForHandle, because neither components/slider/index.en-US.md nor components/slider/index.zh-CN.md adds it to the API table. Add bilingual rows describing its type, default, range-handle behavior, and introduction version as required for new properties.

AGENTS.md reference: AGENTS.md:L89-L94

Useful? React with 👍 / 👎.

@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 6.31MB (-65.47%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.33MB -6.31MB (-65.47%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js (New) 1.85MB 1.85MB 100.0% 🚀
antd.min.js (New) 1.48MB 1.48MB 100.0% 🚀
antd-with-locales.js (Deleted) -5.11MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -4.52MB 0 bytes -100.0% 🗑️

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ca9ff9
Status: ✅  Deploy successful!
Preview URL: https://c2b15bf3.ant-design.pages.dev
Branch Preview URL: https://bump-slider.ant-design.pages.dev

View logs

@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (500177b) to head (3ca9ff9).
⚠️ Report is 25 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #59110   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          834       834           
  Lines        16057     16057           
  Branches      4229      4229           
=========================================
  Hits         16057     16057           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yoyo837

yoyo837 commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Waiting #59111

@nrps9909 nrps9909 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new prop is exposed in the public type but is not preserved by the default Ant Design Slider rendering path. I verified this on exact head c53a696 with @rc-component/[email protected]:

const { container } = render(
  <Slider defaultValue={20} ariaDescribedByForHandle="description" />,
);
expect(container.querySelector('[role="slider"]')).toHaveAttribute(
  "aria-describedby",
  "description",
);

The assertion fails because the handle has no aria-describedby. The same probe rendered directly with RcSlider passes. Ant Design always supplies its internal handleRender; the resulting handle is wrapped in SliderTooltip, and rc-tooltip clones the child with aria-describedby: undefined while the tooltip is closed, overriding the consumer-provided description. When the tooltip opens, its generated id would also replace rather than compose with the supplied description.

Please preserve the caller-provided description in the default tooltip path (and compose it with the tooltip id while open), with single-handle and per-handle range regressions. The existing Slider scope passes 77 tests / 49 snapshots, but none exercises this new contract.

@yoyo837

yoyo837 commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Wating react-component/tooltip#542 release patch.

@socket-security

socket-security Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​rc-component/​slider@​1.2.09910010086100

View full report

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 27, 2026
@yoyo837
yoyo837 merged commit a1710d4 into feature Aug 27, 2026
46 checks passed
@yoyo837
yoyo837 deleted the bump-slider branch August 27, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants