Skip to content

Conversation

@JinMokai
Copy link

fix(radio): remove deprecated invalid property in favor of group validation

Description

Removed the deprecated invalid property from the sp-radio component. Validation state should be managed at the sp-radio-group level.

  • Removed invalid property and aria-invalid handling from sp-radio.
  • Updated sp-radio-group to reflect the invalid state using the aria-invalid attribute.
  • Updated stories to remove the deprecated invalid controls on individual radio buttons.
  • Added unit tests to verify aria-invalid toggling on sp-radio-group.

Motivation and context

The invalid property on individual sp-radio elements was deprecated. Standard accessibility and design patterns for radio buttons dictate that validation should occur at the group level rather than on individual options. This change enforces that pattern and ensures the aria-invalid state is correctly applied to the group container.

Related issue(s)

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result
  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2026

⚠️ No Changeset found

Latest commit: fc58d58

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Remove deprecated support for aria-invalid state on the Radio Component

1 participant