Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
left a comment
There was a problem hiding this comment.
Just a couple questions but non-blocking. Great job!
| * since promises are high priority. | ||
| */ | ||
| Promise.resolve().then(() => { | ||
| this.hintTextID = this.getHintTextID(); |
There was a problem hiding this comment.
Why do we use a state here instead of calling forceUpdate?
There was a problem hiding this comment.
The comment looks like it describes why, though it may have been added after (I appreciate it either way). Maybe @thetaPC found this more reliable than my method of using forceUpdate? My attempt was not perfect, so a more reliable method would be great
There was a problem hiding this comment.
@brandyscarney I've updated the comment to explain it a bit better: 641f250
| * Checks if the input is in an invalid state based | ||
| * on Ionic validation classes. | ||
| */ | ||
| private checkInvalidState(): boolean { |
There was a problem hiding this comment.
Can we move this to a shared util file since it's used by multiple components?
ShaneK
left a comment
There was a problem hiding this comment.
I've tested and reviewed this and it looks great! I did agree with Brandy's request to move the validation check to a util file since we'll apparently be using it in multiple places, but that's a non-blocking request IMO. Great work!
Issue number: internal
What is the current behavior?
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?
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?
Other information
Preview