-
Notifications
You must be signed in to change notification settings - Fork 337
fix(picker): add aria-* for datepicker #4028
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
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe changes enhance the date picker component's accessibility by introducing ARIA attributes that establish relationships between form controls and the picker panel. A unique panel identifier is generated using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/vue/src/picker/src/pc.vue`:
- Around line 165-168: There's a typo in the ARIA attribute on the panel:
replace the invalid aria-lable with the correct aria-label attribute on the
element that has role="dialog" (the same element using aria-modal="false" and
:id="state.ariaPanelId") so assistive technologies can read the panel name;
update the attribute name only (keep the same value) to aria-label.
| role="dialog" | ||
| aria-modal="false" | ||
| aria-lable="picker-panel" | ||
| :id="state.ariaPanelId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix ARIA attribute typo on panel.
aria-lable is invalid and won’t be read by assistive tech.
🔧 Proposed fix
- aria-lable="picker-panel"
+ aria-label="picker-panel"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| role="dialog" | |
| aria-modal="false" | |
| aria-lable="picker-panel" | |
| :id="state.ariaPanelId" | |
| role="dialog" | |
| aria-modal="false" | |
| aria-label="picker-panel" | |
| :id="state.ariaPanelId" |
🤖 Prompt for AI Agents
In `@packages/vue/src/picker/src/pc.vue` around lines 165 - 168, There's a typo in
the ARIA attribute on the panel: replace the invalid aria-lable with the correct
aria-label attribute on the element that has role="dialog" (the same element
using aria-modal="false" and :id="state.ariaPanelId") so assistive technologies
can read the panel name; update the attribute name only (keep the same value) to
aria-label.
PR
为 date-picker组件添加 aira-* 的辅助信息
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.