Skip to content

refactor(input): remove legacy property and support for legacy syntax #29017

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

Merged
merged 8 commits into from
Feb 13, 2024

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Feb 12, 2024

Issue number: internal


What is the current behavior?

In Ionic Framework v7, we simplified the input syntax so that it was no longer required to be placed inside of an ion-item. We maintained backwards compatibility by adding a legacy property which allowed it to continue to be styled properly when written in the following way:

<ion-item>
  <ion-label>Label</ion-label>
  <ion-input></ion-input>
</ion-item>

While this was supported in v7, console warnings were logged to notify developers that they needed to update this syntax for the best accessibility experience.

What is the new behavior?

  • Removes the legacy property and support for the legacy syntax. Developers should follow the migration guide in the input documentation to update their apps. The new syntax requires a label or aria-label on ion-input:
    <ion-item>
      <ion-input label="Label"></ion-input>
    </ion-item>
  • Removes the legacy tests under under input/test/legacy/ and all related screenshots
  • Removes the input usage from item/test/a11y, item/test/counter, item/test/disabled, item/test/highlight, item/test/legacy/alignment, item/test/legacy/disabled, item/test/legacy/fill, and item/test/legacy/form and all related screenshots if the test was removed

Does this introduce a breaking change?

  • Yes
  • No
  1. Developers have had console warnings when using the legacy syntax since the v7 release. The migration guide for the new input syntax is outlined in the Input documentation.
  2. This change has been documented in the Breaking Changes document with a link to the migration guide.

BREAKING CHANGE:

The legacy property and support for the legacy syntax, which involved placing an ion-input inside of an ion-item with an ion-label, have been removed from input. For more information on migrating from the legacy input syntax, refer to the Input documentation.

@github-actions github-actions bot added the package: core @ionic/core package label Feb 12, 2024
@brandyscarney brandyscarney marked this pull request as ready for review February 12, 2024 20:59
@brandyscarney brandyscarney requested a review from a team as a code owner February 12, 2024 20:59
@brandyscarney brandyscarney requested review from liamdebeasi and removed request for a team February 12, 2024 20:59
@github-actions github-actions bot added package: angular @ionic/angular package package: vue @ionic/vue package labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants