-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccordionBox: remove or instrument interactivity of titlebar #477
Comments
Removing titlebar interactivity from AccordionBox would be very easy, is very isolated, and is very low risk. Remove option if ( options.titleBarExpandCollapse ) {
this.collapsedTitleBar.addInputListener( {
down: function() {
self.phetioStartEvent( 'expanded' );
self.expandedProperty.value = true;
self.phetioEndEvent();
}
} );
}
// Set the input listeners for the expandedTitleBar
if ( options.showTitleWhenExpanded ) {
if ( options.titleBarExpandCollapse ) {
this.expandedTitleBar.addInputListener( {
down: function() {
self.phetioStartEvent( 'collapsed' );
self.expandedProperty.value = false;
self.phetioEndEvent();
}
} );
}
} And there are 2 sims that set option
|
Removing this feature would resolve #423. There are 2 open issues for AccordionBox a11y design, #359 and #444. General design is described in AccordionBox.md. It looks like the main change for a11y is the focus highlight. Instead of surrounding the title, the focus highlight would surround the ExpandCollapseButton. Relevant bits from AccordionBox.md:
|
@jessegreenberg Let's discuss whenever you're available. |
@jessegreenberg and I discussed on Slack. He doesn't see any problem with what's proposed. And he pointed out that removing interactivity will not affect the focus highlight specification in AccordionBox.md, since the titlebar will still be present. So I will proceed. |
@arouinfar was not in the meeting for phetsims/graphing-quadratics#112, so I checked in with her on Slack: Chris Malley [12:40 PM] Amy Rouinfar [12:41 PM] Chris Malley [12:41 PM] |
@ariel-phet please assign someone to review. This should be a quick review, the changes were minimal. |
Code changes look good and I tested a number of AccordionBox usages as well. |
By popular demand, we're restoring this feature. From #502 (comment)...
|
Feature is restored, and interactivity of the title bar is now disabled when the button is hidden. @jbphet please review, since you have a sim to patch this in. |
@jbphet to verify that the PhET-iO issue was addressed:
|
Since option |
The commits look reasonable, and I verified the functionality in Isotopes and Atomic Mass, since that's the sim I want to patch. I then ran test on Graphing Quadratics described a couple of comments above this (I had to run I'm going to assign this to @zepumph for one (hopefully) small followup item: The code that was restored uses the following pattern: self.phetioStartEvent( 'expanded' );
self.expandedProperty.value = true;
self.phetioEndEvent(); I haven't seen the explicit start and stop invocations for a while, and I know that the API has changed a fair amount, so it would be good for a PhET-iO expert to have a look and make sure that this is still the way things are done. If so, please close. |
This all looks good from a phet-io perspective
Most of the time we are using Property and Action for our event stream. Those types use the "phetioStart/EndEvent" call. In this case we have a custom event so we implement them here, and AccordionBoxIO supports the events in particular (notice |
In phetsims/graphing-quadratics#112, the design team identified that interactivity of the AccordionBox's titlebar is problematic, and the consensus is that we'd like to remove that feature. The way to expand/collapse the AccordionBox would be via its ExpandCollapseButton. This would address other issues that titlebar interactively has caused, and simplify AccordionBox's implementation a bit.
I was assigned to create this issue, evaluate the impact on AccordionBox implementation, and
discuss a11y impact with @jessegreenberg.
This issue also affects how we proceed with #480.
The text was updated successfully, but these errors were encountered: