Difficulty: Advanced
Type: Refactor
Summary
Replace click-to-remove role badges with an explicit, accessible role removal control.
Current Behaviour
Roles in the admin member list are rendered as badges with an onClick handler. Clicking the badge removes the role. This can be easy to trigger accidentally, is not clearly communicated as a destructive action, and may not be fully accessible to keyboard and screen reader users.
Expected Behaviour
Role removal should be an intentional action with clear affordance, keyboard support, accessible labels, and optional confirmation for sensitive roles such as admin.
Suggested Implementation
Replace clickable badges with a small remove button inside or beside each role badge. Add aria-label text such as Remove admin role from 0x.... Consider requiring confirmation when removing admin or the last remaining role from a member. Preserve optimistic update and rollback behaviour.
Files or Areas Likely Affected
app/admin/members/page.tsx
components/ui/badge.tsx
components/wallet/address-text.tsx
lib/api/optimistic.ts
test/
Acceptance Criteria
Additional Notes
This issue builds on the existing role removal functionality. It should not change the backend role removal contract.
Difficulty: Advanced
Type: Refactor
Summary
Replace click-to-remove role badges with an explicit, accessible role removal control.
Current Behaviour
Roles in the admin member list are rendered as badges with an
onClickhandler. Clicking the badge removes the role. This can be easy to trigger accidentally, is not clearly communicated as a destructive action, and may not be fully accessible to keyboard and screen reader users.Expected Behaviour
Role removal should be an intentional action with clear affordance, keyboard support, accessible labels, and optional confirmation for sensitive roles such as
admin.Suggested Implementation
Replace clickable badges with a small remove button inside or beside each role badge. Add
aria-labeltext such asRemove admin role from 0x.... Consider requiring confirmation when removingadminor the last remaining role from a member. Preserve optimistic update and rollback behaviour.Files or Areas Likely Affected
app/admin/members/page.tsxcomponents/ui/badge.tsxcomponents/wallet/address-text.tsxlib/api/optimistic.tstest/Acceptance Criteria
Additional Notes
This issue builds on the existing role removal functionality. It should not change the backend role removal contract.