From 73f1b5ab4c590c9441f68839228f90145d0b120a Mon Sep 17 00:00:00 2001 From: mhdsbq Date: Sat, 23 Aug 2025 22:37:46 +0530 Subject: [PATCH] fix(material/form-field): restore error message animation When a form becomes invalid and displays an error, the error message was no longer animating. This regression was introduced in #30678 (accessibility changes), because error elements were no longer destroyed/re-rendered, preventing the CSS animation from running. This fix ensures that the animation works again without impacting accessibility. Fixes #31712 --- src/material/form-field/form-field.html | 30 ++++++++++--------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/material/form-field/form-field.html b/src/material/form-field/form-field.html index 2697be0d764c..b5e38afad4fb 100644 --- a/src/material/form-field/form-field.html +++ b/src/material/form-field/form-field.html @@ -95,34 +95,28 @@ } -
@let subscriptMessageType = _getSubscriptMessageType(); - -
- @switch (subscriptMessageType) { - @case ('error') { + @switch (subscriptMessageType) { + @case ('error') { +
- } +
+ } - @case ('hint') { + @case ('hint') { +
@if (hintLabel) { {{hintLabel}} }
- } +
} -
+ }