Skip to content

BBBModal: Allow defining data test for modal close button #43

Closed

Description

@Arthurk12

Is your feature request related to a problem? Please describe.
There is currently no way to define a data-test attribute for the close button rendered internally by BBBModal. This makes it harder to target the button in automated tests without relying on fragile selectors.

Describe the solution you'd like
Add a prop (e.g. closeButtonDataTest) to BBBModal that allows consumers to pass a custom data-test attribute to the internal close button.

Describe alternatives you've considered
Targeting the close button via CSS selectors or positional queries in tests, but these approaches are brittle and not recommended for automated testing.

Affected component(s)
BBBModal

Proposed API / Usage Example

<BBBModal
  title="Settings"
  closeButtonDataTest="modal-close-button"
>
  {/* modal content */}
</BBBModal>

Activity

  1. added
    enhancement
    on Jun 16, 2026
  2. self-assigned this
    on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions