fix(resources): associate filter checkboxes with labels explicitly - #8080
tejaswiverma121-byte wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughResource filter JSX and the GraphQL query were reformatted. Filter options now use matching count-group lookups, omit unmatched items, and connect each checkbox to its label with ChangesResource filter controls
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The resource filters retain their selection behavior while labels now explicitly associate with their checkboxes. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/sections/Resources/Resources-grid/filters.jsParsing error: The keyword 'import' is reserved 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.
Reviewed the complete diff and options.js. The accessibility fix and .find() changes look correct, and the existing filtering behavior is preserved.
One change requested: IDs currently use x.value, but values like Recorded Webinar, Docker Extension, and Open Service Mesh contain spaces. Please use the existing x.id instead
const filterId = `type-${x.id}`;
<label htmlFor={filterId}>
<input id={filterId} ... />
Apply the same pattern for Product, Technology, and Service Mesh. This keeps IDs unique, deterministic, and valid.
Add category-scoped unique IDs and matching htmlFor attributes to checkbox filters using x.id to prevent whitespace and ensure proper accessibility association. Signed-off-by: tejaswiverma <tejaswiverma121@gmail.com>
69fb415 to
c85bdcf
Compare
|
@vedant21-ctr thanks for the review! Updated the filter IDs to use const filterId = ${category}-${x.id} across Type, Product, Technology, and Service Mesh. This removes all whitespace from IDs while keeping them unique and valid HTML5 IDs |
|
Preview deployment for PR #8080 removed. This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits. If needed, push a new commit to this PR to generate a fresh preview. |
Description
This PR fixes #8063
Add category-scoped unique IDs and matching htmlFor attributes to checkbox filters on the Resources page to ensure proper accessibility association.
Notes for Reviewers
Signed commits
Summary by CodeRabbit
Accessibility
Bug Fixes