Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bug(mat-form-field): when subscript sizing is set to fixed, not all hint or error text is visible

未关闭
#33,510 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
angular, typescript

调研方向

从 src/example/form-field-overview-example.html 中的 StackBlitz 复现开始,比较固定和动态 subscript 大小调整在提示文本和错误文本换行时的表现。追踪负责 subscript 布局的 Angular Material form-field 实现,然后验证固定大小调整能够保留其预留空间,同时显示所有提示文本或错误文本,而不会出现报告中的动态大小调整问题。

由索引模型根据 Issue 内容生成。

描述

area: material/form-field gemini-triaged
Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

No response

Description

When Form Field subscript sizing is set to fixed, and the hint or error text wraps to multiple lines, the hint or error text may not be visible to the user causing accessibility issues:

Image

This issue does not occur when subscript sizing is set to dynamic, but the dynamic is not the default and is argued against in your documentation, and does not have reserved space for the hint or error text causing the dynamic subscript sizing to look off with not enough spacing at the bottom or between Form Fields, and there's additional issue with the dynamic subscript sizing where it affects the width of the Form Field:

Image

Does that look right to you? It does not to me, but at least it is accessible unlike fixed subscript sizing

Ideally, there should be a subscript sizing option that both has a min height and that can expand into more space when hint or error text does not fit in one line

Reproduction

StackBlitz link: https://stackblitz.com/edit/lyvjfmdq?file=src%2Fexample%2Fform-field-overview-example.html

Expected Behavior

All hint or error text is visible

Actual Behavior

Not all hint or error text is visible

Environment
  • Angular: v22
  • CDK/Material: v22
  • Browser(s): Any
  • Operating System (e.g. Windows, macOS, Ubuntu): Any
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 1 小时
30 天内合并 PR
84

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/components 的其他 Issue

查看 angular/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。