Skip to content

Sun buttons should discover a default for accessibleName. #928

@pixelzoom

Description

@pixelzoom

Over in MOTHA phetsims/models-of-the-hydrogen-atom#140, I discovered that sun buttons do not discover a default accessibleName.

This could be handled in ButtonNode by adding:

    // If no accessibleName is provided, look for one in the content Node
    if ( !options.accessibleName && this.content ) {
      this.accessibleName = findStringProperty( this.content );
    }

I also see the code below in RectangularRadioButtonGroup. This should be removed -- it definitely not be handled by the group, it should have been handled in RectangularRadioButton. And by making the change above for ButtonNode (superclass of RectangularRadioButton), it should be totally unnecessary.

      // pdom - If the radio button was not assigned an accessibleName, search for a default one
      // in the button. It may come from the button content or its label.
      if ( !radioButton.accessibleName ) {
        radioButton.accessibleName = findStringProperty( button );
      }

It would be great to address this before MOTHA 1.0 RC testing, which will likely begin the week of 3/3/2025.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions