Skip to content

Commit

Permalink
use innerContent, #86
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 8, 2023
1 parent b73e9d8 commit de8a9f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/common/view/InteractiveNumberDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export default class InteractiveNumberDisplay extends NumberDisplay {
backgroundStroke: Color.BLACK,

// a11y
accessibleName: new DerivedProperty( [ property, units ], ( value, units ) => {
// innerContent to support dynamic changes
innerContent: new DerivedProperty( [ property, units ], ( value, units ) => {
return `${Utils.toFixed( value, 2 )} ${units}`;
} ),
tagName: 'button',
Expand Down

0 comments on commit de8a9f4

Please sign in to comment.