[dev-v5] Accessibility - FluentSelect - #5074
Merged
Denis Voituron (dvoituron) merged 6 commits intoAug 4, 2026
Merged
Conversation
…xpanded attributes to the control button
…t selection and ensuring aria-label and aria-expanded attributes are set correctly
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
August 4, 2026 13:00
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors FluentSelect JavaScript interop to use the shared Core.Scripts exported-methods pipeline and adds initialization logic intended to (1) set the combobox display value correctly on first render and (2) improve accessibility by ensuring aria-label / aria-expanded are present on the internal control.
Changes:
- Moved FluentSelect JS interop from a collocated component script to
src/Core.Scriptsand registered it viaExportedMethods. - Updated
FluentSelect.razor.csto call the new exported JS methods (Initialize,ClearValue) viaJSRuntime.InvokeFluentVoidAsync. - Added a new JS
Initializemethod to set combobox text and apply ARIA attributes to the slotted control element.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Core/Components/List/FluentSelect.razor.ts | Removed the old collocated TS interop implementation. |
| src/Core/Components/List/FluentSelect.razor.cs | Switched interop calls to the exported-methods approach and added Initialize call on first render. |
| src/Core.Scripts/src/ExportedMethods.ts | Registered the new Select exported-methods namespace on window.Microsoft.FluentUI.Blazor.Components. |
| src/Core.Scripts/src/Components/List/FluentSelect.ts | Introduced Initialize/ClearValue implementations and ARIA attribute setup logic. |
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.8%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
Denis Voituron (dvoituron)
enabled auto-merge (squash)
August 4, 2026 13:12
Vincent Baaij (vnbaaij)
approved these changes
Aug 4, 2026
Denis Voituron (dvoituron)
deleted the
users/dvoituron/dev-v5/accessibility/select-ariaexpanded
branch
August 4, 2026 13:52
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.
[dev-v5] Accessibility - FluentSelect
Update the FluentSelect components and improve its JavaScript interop methods.
Refactor the initialization process to set the combo box value correctly and enhance accessibility by adding necessary ARIA attributes:
aria-labelandaria-expanded.This update ensures a better user experience and compliance with accessibility standards.
Before
After
Unit Tests
No changes