Issue number: resolves internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Currently, when an error text is shown, it may not announce itself to voice assistants. This is because the way error text currently works is by always existing in the DOM, but being hidden when there is no error. When the error state changes, the error text is shown, but as far as the voice assistant can tell it's always been there and nothing has changed. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> With these changes, both input and textarea have been updated so they'll properly announce error text when it shows up. We had to do this with a mutation observer and state because it's important in some frameworks, like Angular, that state changes to cause a re-render. This, combined with some minor aria changes, makes it so that when a field is declared invalid, it immediately announces the invalid state instead of waiting for the user to go back to the invalid field. ## Does this introduce a breaking change? - [ ] Yes - [X] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Current dev build: ``` 8.7.4-dev.11756220757.185b8cbf ``` ## Screens [Textarea](https://ionic-framework-git-ionic-49-ionic1.vercel.app/src/components/textarea/test/validation) [Input](https://ionic-framework-git-ionic-49-ionic1.vercel.app/src/components/input/test/validation) --------- Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
@ionic/angular
Ionic Angular specific building blocks on top of @ionic/core components.
Related
License
Testing Local Ionic Framework with ng add
This guide shows you how to test the local Ionic Framework build with a new Angular application using ng add. This is useful for development and testing changes before publishing.
Prerequisites
- Node.js and npm installed
- Angular CLI installed globally (
npm install -g @angular/cli)
Build Local Ionic Framework
-
Clone the repository (if not already done):
git clone https://github.com/ionic-team/ionic-framework.git cd ionic-framework -
Pull the latest from
maingit pull origin main -
Install dependencies and build the
corepackage:cd core npm install npm run build -
Install dependencies, sync the
corebuild and build the Angular package:cd ../packages/angular npm install npm run sync npm run build -
Create a tarball:
cd dist npm pack -
Copy the tarball to Downloads:
cp ionic-angular-*.tgz ~/Downloads/ionic-angular.tgz
Test with New Angular App
-
Create a new Angular app:
# Change to whichever directory you want the app in cd ~/Documents/ ng new my-app --style=css --ssr=false --zoneless=false cd my-app -
Install the local
@ionic/angularpackage:npm install ~/Downloads/ionic-angular.tgz -
Run
ng add:ng add @ionic/angular --skip-confirmation -
Serve the app:
ng serve
The local Ionic Framework build is now active in the Angular app. Changes to the Ionic source code require rebuilding the packages and reinstalling the tarball to see updates.
Project Structure
common
This is where logic that is shared between lazy loaded and standalone components live. For example, the lazy loaded IonPopover and standalone IonPopover components extend from a base IonPopover implementation that exists in this directory.
Note: This directory exposes internal APIs and is only accessed in the standalone and src submodules. Ionic developers should never import directly from @ionic/angular/common. Instead, they should import from @ionic/angular or @ionic/angular/standalone.
standalone
This is where the standalone component implementations live. It was added as a separate entry point to avoid any lazy loaded logic from accidentally being pulled in to the final build. Having a separate directory allows the lazy loaded implementation to remain accessible from @ionic/angular for backwards compatibility.
Ionic developers can access this by importing from @ionic/angular/standalone.
src
This is where the lazy loaded component implementations live.
Ionic developers can access this by importing from @ionic/angular.