Skip to content

fix: add initialized state to CarouselContext to track carousel initialization#92

Merged
theMasudRana merged 2 commits intodevelopfrom
fix/78
Mar 26, 2026
Merged

fix: add initialized state to CarouselContext to track carousel initialization#92
theMasudRana merged 2 commits intodevelopfrom
fix/78

Conversation

@mi5t4n
Copy link
Member

@mi5t4n mi5t4n commented Mar 24, 2026

Summary

This PR updates aria-current="true" for the slides as well when it changes.

Type of change

  • Bug fix
  • New feature
  • Enhancement/refactor
  • Documentation update
  • Test update
  • Build/CI/tooling

Related issue(s)

Closes #78

What changed

Added an internal flag to check for the Embla initialization before isSlideActive callback.

Breaking changes

Does this introduce a breaking change? If yes, describe the impact and migration path below.

  • Yes — migration path:
  • No

Testing

Describe how this was tested.

  • Unit tests
  • Manual testing
  • Cross-browser testing (if UI changes)

Test details:

Screenshots / recordings

If applicable, add screenshots or short recordings.

Checklist

  • I have self-reviewed this PR
  • I have added/updated tests where needed
  • I have updated docs where needed
  • I have checked for breaking changes

@mi5t4n mi5t4n self-assigned this Mar 24, 2026
@mi5t4n mi5t4n requested a review from theMasudRana March 24, 2026 09:14
theMasudRana
theMasudRana previously approved these changes Mar 24, 2026
Copy link
Collaborator

@theMasudRana theMasudRana left a comment

Choose a reason for hiding this comment

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

The changes look good to me.

Tested from my end for the following points:

  • No breaking changes
  • Updates the state correctly when the loop is true.
  • Updates the state correctly when free drag is enabled.
  • Updates the state correctly when scroll snap is used.

Copy link
Collaborator

@theMasudRana theMasudRana left a comment

Choose a reason for hiding this comment

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

Tested after the last push.
Everything looks good.

@theMasudRana theMasudRana merged commit 71de050 into develop Mar 26, 2026
4 checks passed
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.

isSlideActive callback never returns true

2 participants