Skip to content

[Wizard] Expose the current and disabled steps to screen readers - #5479

Merged
Denis Voituron (dvoituron) merged 4 commits into
microsoft:devfrom
oONoobMasterOo:fix/wizard-current-step-aria
Oct 21, 2026
Merged

Denis Voituron (dvoituron) merged 4 commits into
microsoft:devfrom
oONoobMasterOo:fix/wizard-current-step-aria

Conversation

@oONoobMasterOo

@oONoobMasterOo NoobMaster (oONoobMasterOo) commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

📖 Description

The FluentWizard steps (li) identify the current step only with the custom status attribute, and disabled steps with a disabled attribute, which has no meaning on a list item. Screen readers therefore can't tell which step is the current one, or that a step is disabled (WCAG 1.3.1 / 4.1.2).

Changes

FluentWizardStep now renders:

  • aria-current="step" on the current step,
  • aria-disabled="true" on a disabled step.

The visual rendering doesn't change (the status and disabled attributes are kept for the CSS).

🎫 Issues

  • None.

👩‍💻 Reviewer Notes

Only two attributes are added; the visual rendering doesn't change.

The steps can be clicked with a mouse (@onclick on the li), but they're not focusable or operable with the keyboard; the Previous / Next buttons remain available. Making the steps keyboard-operable changes their semantics (buttons / links inside the list), so I kept it out of this PR; happy to work on it if you agree.

📑 Test Plan

Unit tests

Added FluentWizard_CurrentStep_IsExposedToAssistiveTechnologies, and updated the FluentWizard snapshots with the two attributes.

  • Full tests/Core suite on this branch: 4904 tests, 0 failed (at 3c66e5875).

Other checks

  • Not tested with a screen reader.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

AI contribution declaration

AI assistance is allowed; fully AI-generated or autonomous pull requests without meaningful human review are not accepted. See the AI contribution policy.

  • I have read and followed the AI contribution policy.
  • I have personally reviewed and understood all changes, tested them, and take responsibility for this contribution.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

Keyboard-operable steps: #5482.

The current step was only identified by a custom status attribute, and the
disabled attribute has no meaning on a list item. The steps now set
aria-current="step" and aria-disabled.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused attributes match existing state and have corresponding test coverage, with no blocking issues identified; tests were not executed.

No open issues 🎉

What changed in this PR

Improves FluentWizard accessibility by exposing existing step state to screen readers without changing visuals or navigation.

Changes:

  • Adds aria-current="step" and aria-disabled="true" where applicable.
  • Adds navigation assertions and updates snapshots for the new attributes.
File Description
tests/​Core/​Components/​Wizard/​FluentWizardTests.razor Tests accessible state after navigation.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_WithSteps.verified.razor.html Updates current-step snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_ValueBinding.verified.razor.html Updates bound-value snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_StepTemplate.verified.razor.html Updates step-template snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_StepSequenceAny.verified.razor.html Updates unrestricted-navigation snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_PreviousButton.verified.razor.html Updates previous-navigation snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_NextButton.verified.razor.html Updates next-navigation snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_DisabledStep.verified.razor.html Captures current and disabled attributes.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_DeferredLoading.verified.razor.html Updates deferred-loading snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_Default.verified.razor.html Updates default-state snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_CancelStepChange.verified.razor.html Updates canceled-navigation snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_ButtonTemplate.verified.razor.html Updates button-template snapshot.
tests/​Core/​Components/​Wizard/​FluentWizardTests.FluentWizard_Border.verified.razor.html Updates bordered-wizard snapshot.
src/​Core/​Components/​Wizard/​FluentWizardStep.razor Emits ARIA attributes from existing state.

Review effort: Balanced

@dvoituron

Copy link
Copy Markdown
Collaborator

We've added a new requirement regarding PRs

@oONoobMasterOo

Copy link
Copy Markdown
Contributor Author

We've added a new requirement regarding PRs

Done

@dvoituron
Denis Voituron (dvoituron) merged commit dc38e2a into microsoft:dev Oct 21, 2026
4 checks passed
This was referenced Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants