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: Adds aria-* to TreeSelect #41978

Merged
merged 5 commits into from
Apr 25, 2023
Merged

fix: Adds aria-* to TreeSelect #41978

merged 5 commits into from
Apr 25, 2023

Conversation

guan404ming
Copy link
Contributor

@guan404ming guan404ming commented Apr 24, 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

  1. close TreeSelect component should support 'aria-label' option prop. #40055

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Adds aria-* to TreeSelect
🇨🇳 Chinese 添加 aria-* 到 TreeSelect

☑️ 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 8b2bbea

This pull request enhances the accessibility of the TreeSelect component by adding the aria-label prop, which allows users to specify custom labels for the tree nodes. It also adds a test case to verify the functionality of the new prop.

🔍 Walkthrough

🤖 Generated by Copilot at 8b2bbea

  • Add aria-label prop to TreeSelect component to support accessibility labels (link, link, link, link)
  • Define aria-label prop in TreeSelectProps interface in components/tree-select/index.tsx (link)
  • Assign aria-label prop to ariaLabel variable in InternalTreeSelect function in components/tree-select/index.tsx (link)
  • Pass ariaLabel variable to rc-tree-select component in InternalTreeSelect function in components/tree-select/index.tsx (link)
  • Add test case to check aria-label prop in components/tree-select/__tests__/index.test.tsx (link)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2023

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (55955d9) 100.00% compared to head (a4a729b) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #41978   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          616       616           
  Lines        10529     10531    +2     
  Branches      2882      2884    +2     
=========================================
+ Hits         10529     10531    +2     
Impacted Files Coverage Δ
components/tree-select/index.tsx 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 24, 2023

Could we support aria-*?

@guan404ming
Copy link
Contributor Author

Could we support aria-*?

I have done this ~~~

@guan404ming guan404ming changed the title fix: Adds aria-label to TreeSelect fix: Adds aria-* to TreeSelect Apr 25, 2023
@afc163 afc163 merged commit 2b98068 into ant-design:master Apr 25, 2023
52 checks passed
@guan404ming guan404ming deleted the TreeSelect-accessibility branch April 25, 2023 07:32
@zombieJ zombieJ mentioned this pull request Apr 26, 2023
16 tasks
@MadCcc MadCcc mentioned this pull request Apr 27, 2023
20 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.

TreeSelect component should support 'aria-label' option prop.
3 participants