Fix: Use semantic button element instead of role="button" in ActiveFiltersBar (#27945)#10406
Conversation
📝 WalkthroughWalkthroughIn ChangesActiveFiltersBar semantic button fix
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/slimy-tools-join.md:
- Around line 1-5: The changeset file is missing the dependent package that
needs to be included per the coding guidelines. Since the change to
`@wso2is/admin.workflow-requests.v1` is in the features/ directory and
`@wso2is/console` depends on this package, you must add `@wso2is/console` with a
patch version bump to the changeset. Add a new line in the changeset file with
"`@wso2is/console`": patch alongside the existing
`@wso2is/admin.workflow-requests.v1` entry.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: e1e86a8e-6a91-48ab-aff6-93817f6b506f
📒 Files selected for processing (3)
.changeset/slimy-tools-join.mdfeatures/admin.workflow-requests.v1/components/active-filters-bar.scssfeatures/admin.workflow-requests.v1/components/active-filters-bar.tsx
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10406 +/- ##
=======================================
Coverage 72.62% 72.62%
=======================================
Files 469 469
Lines 70633 70633
Branches 240 240
=======================================
Hits 51300 51300
Misses 19222 19222
Partials 111 111 🚀 New features to boost your workflow:
|
|
Could you please add a screenshot of before and after UX of this change? |
Hi @pavinduLakshan, here's the current ("before") behavior on the Workflow Requests page, showing the status: Approved filter tag with the existing span-based remove button: The change replaces with . The .filter-remove-button class already had background: transparent and border: none, so I added padding: 0 and font: inherit to neutralize the remaining default styling, which should keep the visual output identical to the "before" state. |
Hi @pavinduLakshan, I've added the screenshot of before and after UX changes to the PR description. |

Purpose
Replaced a
<span role="button">with a semantic<button>element in the filter remove button withinactive-filters-bar.tsx, as flagged by the React Doctor accessibility check (rule: react-doctor/prefer-tag-over-role).Changes:
<span role="button" tabIndex={0} onKeyPress={...}>with<button type="button">, removing the now-redundanttabIndexandonKeyPresshandler since native buttons handle keyboard interaction natively.padding: 0andfont: inheritto.filter-remove-buttonin active-filters-bar.scss to preserve the existing visual appearance after switching fromspantobutton.Included a changeset (patch bump for @wso2is/admin.workflow-requests.v1).
Related Issues
<button>element overrole="button"on a generic tag (1 occurrence) product-is#27945Related PRs
Screenshots
Before (
<span>tag)After (
<button type="button">)Technical Changes
spantobutton.type="button"attribute to suppress default HTML form submission side effects inside the filter container.