Skip to content

Conversation

rohitsahu-bstack
Copy link
Collaborator

<< Describe the changes >>

Closes:

@rohitsahu-bstack rohitsahu-bstack changed the title modal detecting utils chore: modal detecting utils Sep 4, 2025
@rohitsahu-bstack rohitsahu-bstack changed the title chore: modal detecting utils chore: release 5.6.1-at modal detecting utils Sep 16, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds modal detection utilities to the core utils module as part of a 5.6.1-at release. The changes introduce functionality to detect modal dialogs on a webpage using both definitive modal attributes and heuristic-based detection for elements that appear modal-like.

  • Adds two new utility functions for modal detection: detectModalStack and getOverlayFromStack
  • Implements both definitive modal detection (via ARIA attributes and dialog elements) and heuristic detection (based on element size and positioning)
  • Exports the new utilities through the main utils index file

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
lib/core/utils/index.js Exports the two new modal detection utilities
lib/core/utils/detect-modal-stack.js Main modal detection function that finds both definitive and potential modals
lib/core/utils/get-overlay-from-stack.js Helper function to check if an element appears to be a modal overlay based on size and positioning

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants