MudField: AdornmentAria and ShrinkLabel#11669
Merged
danielchalmers merged 5 commits intoMudBlazor:devfrom Jul 30, 2025
Merged
Conversation
Introduced `AdornmentAriaLabel` for better accessibility in the `MudField` component. Added `ShrinkLabel` parameter to control label display behavior. Created `FieldStartAdornmentTest` to validate `mud-shrink` class application. Updated `FieldTests` to include tests for new features and ensure correct field rendering with various adornment configurations.
- Restructured layout in FieldLabelPlaceholderExample.razor. - Updated ShrinkLabel feature in MudField. - Updated FieldPage.razor documentation for clarity on ShrinkLabel usage. - Modified FieldTests.cs to reflect new ShrinkLabel behavior. - Improved documentation comments for the ShrinkLabel parameter in MudField.razor.cs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #11669 +/- ##
=======================================
Coverage 91.35% 91.35%
=======================================
Files 466 466
Lines 14697 14702 +5
Branches 2853 2853
=======================================
+ Hits 13426 13431 +5
Misses 632 632
Partials 639 639 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds two new accessibility and usability features to the MudField component: AdornmentAriaLabel property for screen reader support and ShrinkLabel property for controlling label positioning behavior.
- Adds
AdornmentAriaLabelproperty to providearia-labelattribute for field adornments - Adds
ShrinkLabelproperty to override default label shrinking behavior, allowing labels to remain as placeholders - Updates documentation and examples to demonstrate the new ShrinkLabel functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MudField.razor.cs | Adds AdornmentAriaLabel and ShrinkLabel properties with logic to control label positioning |
| MudField.razor | Applies AdornmentAriaLabel to both start and end adornments |
| FieldTests.cs | Adds comprehensive unit tests for both new features |
| FieldTest.razor | Updates test component to verify AdornmentAriaLabel functionality |
| FieldStartAdornmentTest.razor | New test component specifically for ShrinkLabel behavior testing |
| FieldPage.razor | Updates documentation to explain the new ShrinkLabel feature |
| FieldLabelPlaceholderExample.razor | Enhanced example demonstrating ShrinkLabel usage with custom input controls |
|
This was referenced Aug 5, 2025
Closed
Closed
This was referenced Oct 6, 2025
This was referenced Nov 12, 2025
This was referenced Dec 12, 2025
Closed
Closed
This was referenced Dec 29, 2025
This was referenced Jan 9, 2026
Closed
This was referenced Feb 10, 2026
Closed
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Resolves #7270
Resolves #5146
Resolves #7533
AdornmentAria was missing from MudField, added the property.
Added an override for ShrinkLabel behavior and updated documentation. This does not affect previous behavior, but allows someone using the MudField to force the label into Placeholder position by setting ShrinkLabel to true.
Added unit tests
Updated Documentation:
Checklist:
dev).