Repository navigation
feat: support aria-describedby on handles - #59110
Conversation
|
|
👁 Visual Regression Report for PR #59110 Failed ❌
Important There are 3 diffs found in this PR: 🔄
📖 中文报告👁 PR #59110 视觉回归报告 失败 ❌
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
size-limit report 📦
|
More templates
commit: |
There was a problem hiding this comment.
💡 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']; |
There was a problem hiding this comment.
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 👍 / 👎.
Bundle ReportChanges will decrease total bundle size by 6.31MB (-65.47%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
Deploying ant-design with
|
| Latest commit: |
3ca9ff9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c2b15bf3.ant-design.pages.dev |
| Branch Preview URL: | https://bump-slider.ant-design.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
|
nrps9909
left a comment
There was a problem hiding this comment.
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.
|
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|










中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log