-
Notifications
You must be signed in to change notification settings - Fork 376
feat(Tabs): add tabListAriaLabel prop #12193
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: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds an optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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: 0
🧹 Nitpick comments (1)
packages/react-core/src/components/Tabs/Tabs.tsx (1)
64-65: Consider clarifying the documentation.The documentation "Aria-label for the list element" could be more specific. Consider updating it to explicitly mention that this labels the
<ul role="tablist">element to help developers understand its purpose better.📝 Suggested documentation improvement
- /** Aria-label for the list element */ + /** Aria-label for the tab list element (the <ul> with role="tablist"). When multiple tab sets exist on a page, provide a unique label to differentiate them for screen readers. */ tabListAriaLabel?: string;
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/react-core/src/components/Tabs/Tabs.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build
- GitHub Check: Build, test & deploy
🔇 Additional comments (2)
packages/react-core/src/components/Tabs/Tabs.tsx (2)
505-505: LGTM!The prop is correctly extracted from props and properly positioned in the destructuring statement.
632-638: LGTM!The implementation correctly applies the
aria-labelto the tab list element with an appropriate fallback. The approach is consistent with similar props in the component (e.g.,addButtonAriaLabelat line 658).
|
Preview: https://pf-react-pr-12193.surge.sh A11y report: https://pf-react-pr-12193-a11y.surge.sh |
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
🧹 Nitpick comments (1)
packages/react-core/src/components/Tabs/Tabs.tsx (1)
64-65: Consider clarifying the prop documentation.The comment "Aria-label for the list element" could be more specific. Consider updating it to indicate this applies specifically to the
<ul role="tablist">element, and provide guidance on when consumers should set this prop.🔎 Suggested documentation improvement
- /** Aria-label for the list element */ + /** Aria-label for the tab list element (<ul role="tablist">). Provide a descriptive label to identify the purpose of the tab set for assistive technologies. */ tabListAriaLabel?: string;
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/react-core/src/components/Tabs/Tabs.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build
- GitHub Check: Build, test & deploy
Signed-off-by: Mohamed Fall <ps.hackmaster@gmail.com>
|
Hey @thatblindgeye, I think this Closes #12128 , unless you'd rather have like a whole |
What
Add
tabListAriaLabelprop to set a custom aria-label on the tab list (Closes #12128)Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.