Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: options missing id #45287

Merged
merged 1 commit into from Oct 12, 2023
Merged

fix: options missing id #45287

merged 1 commit into from Oct 12, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Oct 11, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

resolve #44505

💡 Background and solution

补了一下文档 label for,发现可以优化一下 options

📝 Changelog

Language Changelog
🇺🇸 English Checkbox.Group & Radio.Group options add missing id props.
🇨🇳 Chinese Checkbox.Group 与 Radio.Group 的 options 添加 id 属性支持。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at e9df555

This pull request improves the accessibility and code style of the theme picker and the checkbox and radio groups by adding and passing id props to the components. It also adds test cases and formats the test files for the Checkbox.Group and Radio.Group components. It modifies the ThemePicker.tsx, ColorPicker.tsx, RadiusPicker.tsx, and index.tsx files to use the id props and link the labels with the inputs.

🔍 Walkthrough

🤖 Generated by Copilot at e9df555

  • Add id prop to Checkbox.Group, Radio.Group, ThemePicker, ThemeColorPicker, and RadiusPicker components to improve accessibility (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Refactor Radio.Group component in .dumi/pages/index/components/Theme/index.tsx to use options prop instead of Radio children (link)
  • Reorder import statements in ThemePicker.tsx and Group.tsx (link, link)
  • Add empty lines at the beginning of group.test.tsx files (link, link)

@stackblitz
Copy link

stackblitz bot commented Oct 11, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 397.78 KB (+10 B 🔺)
./dist/antd-with-locales.min.js 457.09 KB (+11 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Oct 11, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Oct 11, 2023, 12:14 PM

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (80da4e5) 100.00% compared to head (e9df555) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##            master    #45287    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          693       692     -1     
  Lines        11842     11667   -175     
  Branches      3172      3117    -55     
==========================================
- Hits         11842     11667   -175     
Files Coverage Δ
components/checkbox/Group.tsx 100.00% <ø> (ø)
components/radio/group.tsx 100.00% <ø> (ø)

... and 5 files with indirect coverage changes

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

@zombieJ zombieJ merged commit 70ce748 into master Oct 12, 2023
97 checks passed
@zombieJ zombieJ deleted the fix-id branch October 12, 2023 01:43
@aide-cloud
Copy link

感觉没有完全解决, 除了PR里面修复的组件, input、select等组件也有同样问题, 希望统一处理一次

@MadCcc MadCcc mentioned this pull request Oct 13, 2023
20 tasks
@wangyingjie123
Copy link

并没有完全解决,radioGroup还是有问题

@noahge0923
Copy link

radioGroup依旧存在问题。

@yoyo837
Copy link
Contributor

yoyo837 commented Dec 14, 2023

@wangyingjie123 @noahge0923 帮忙来个复现开个新issue?

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.

Form表单报错Incorrect use of <label for=FORM_ELEMENT>
6 participants