Skip to content

Conversation

@terrerox
Copy link
Contributor

@terrerox terrerox commented Oct 6, 2025

Add optional stopMouseDownPropagation prop to control event propagation on mousedown events. Update role attribute to 'modal' for better accessibility and add corresponding tests.

@terrerox terrerox requested a review from CandelR October 6, 2025 16:03
@terrerox terrerox self-assigned this Oct 6, 2025
<>
{showContent && (
<div className="m-0">
<div className="m-0" onMouseDown={(e) => stopMouseDownPropagation && e.stopPropagation()} role='modal'>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider extracting o avoid create new function on every render. Also change role='modal' to role="dialog" aria-modal="true" for ARIA compliance

Extract inline mouseDown handler to prevent function recreation on each render and update role attribute from 'modal' to 'dialog' with aria-modal for proper accessibility standards.
@terrerox terrerox requested a review from CandelR October 8, 2025 00:57
@terrerox terrerox merged commit e4039d3 into master Oct 8, 2025
1 check passed
@terrerox terrerox deleted the feat/add-stop-propagation-modal branch October 8, 2025 13:32
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.

3 participants