Skip to content

feat: decoupled aria-expanded state #227#228

Merged
ianmcburnie merged 6 commits intomasterfrom
227-expander-state
Feb 5, 2026
Merged

feat: decoupled aria-expanded state #227#228
ianmcburnie merged 6 commits intomasterfrom
227-expander-state

Conversation

@ianmcburnie
Copy link
Member

Quick and dirty fix for #227. Decouples expander state from the DOM. All tests still passing.

Copy link

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 decouples the expander's state management from the DOM by introducing an internal _expanded property, allowing the component to work without relying on aria-expanded attributes. This addresses issue #227 by making aria-expanded optional through a new useAriaExpanded configuration option.

Changes:

  • Added internal _expanded state property to track expansion state independently from DOM
  • Introduced useAriaExpanded option (default: true) to make aria-expanded attribute usage optional
  • Updated documentation to reflect the new option and clarify use cases for tooltips

Reviewed changes

Copilot reviewed 4 out of 14 changed files in this pull request and generated 1 comment.

File Description
packages/core/makeup-expander/src/index.js Added _expanded internal state and useAriaExpanded option to conditionally manage aria-expanded attribute
packages/core/makeup-expander/README.md Updated documentation to describe new option and removed deprecated methods section
docs/core/makeup-expander/index.js Added tooltip example demonstrating useAriaExpanded: false usage
docs/core/makeup-expander/index.html Added HTML markup for tooltip demonstration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ianmcburnie and others added 2 commits February 4, 2026 18:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@saiponnada saiponnada left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Minor comments/ thoughts. Also we might need to add a test with aria-expanded.

@ianmcburnie ianmcburnie merged commit f600a51 into master Feb 5, 2026
1 check 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.

2 participants