Skip to content

Make Role Removal Explicit and Accessible #82

Description

@Lakes41

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

  • Role badges are no longer the only clickable removal target.
  • Each role removal action has an accessible label.
  • Keyboard users can trigger role removal.
  • Removing sensitive roles requires confirmation or a clearly intentional action.
  • Pending and rollback states remain visible after removal attempts.
  • Tests cover accessible role removal controls.

Additional Notes

This issue builds on the existing role removal functionality. It should not change the backend role removal contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions