Skip to content

Commit

Permalink
the region holding accessible AccordionBox content is hidden when col…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Nov 13, 2024
1 parent 7b2aad5 commit bfd0064
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/AccordionBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ export default class AccordionBox extends Sizable( Node ) {
this.expandedBox.visible = expanded;
this.collapsedBox.visible = !expanded;

// The "region" containing accessible content should not be discoverable when the box is collapsed.
pdomContentNode.visible = expanded;

this.expandCollapseButton.setFocusHighlight( expanded ? expandedFocusHighlight : collapsedFocusHighlight );

titleNode.visible = ( expanded && options.showTitleWhenExpanded ) || !expanded;
Expand Down

0 comments on commit bfd0064

Please sign in to comment.