Skip to content

fix: move hamburger aria-expanded from wrapper div to its fluent-button - #5659

Closed
Jay (jay23606) wants to merge 2 commits into
microsoft:devfrom
jay23606:pr-go/5644-fix-aria-expanded-is-set-on-the-role-les
Closed

Jay (jay23606) wants to merge 2 commits into
microsoft:devfrom
jay23606:pr-go/5644-fix-aria-expanded-is-set-on-the-role-les

Conversation

@jay23606

@jay23606 Jay (jay23606) commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

📖 Description

The layout hamburger JS put aria-expanded on the wrapper <div>, which has no role. The inner fluent-button is the interactive control, but it did not expose an initial collapsed state to assistive technology.

This change keeps aria-expanded on the inner button, initializes it to false, and keeps aria-controls pointed at the drawer. The render assertion and affected snapshots now cover the initial state.

🎫 Issues

Fixes #5644. The proposed resolution was discussed and approved in the issue discussion.

👩‍💻 Reviewer Notes

Please verify the hamburger button exposes aria-expanded="false" before interaction, then reflects the open and closed states after toggling. Confirm the wrapper has no aria-expanded attribute and the button's aria-controls references the drawer.

📑 Test Plan

  • Added a render assertion for the button's initial aria-expanded="false" and drawer relationship; updated affected snapshots.
  • git diff --check passes.
  • Local dotnet test could not reach test execution: compilation stops with CS9057 because the generator assembly references compiler 5.12 while the installed compiler is 5.9. The PR remains draft for CI validation.

✅ 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.

Issue discussion declaration

Discuss changes before implementing them to confirm that the problem and proposed approach fit the project. See Discuss before implementing for the process and exceptions.

  • I have discussed this change in an issue and received maintainer agreement before implementation, or a documented exception applies.

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

MCP Server

  • I have added or updated MCP Server tools/prompts/resources
  • I have added Unit Tests for my MCP Server changes

⏭ Next Steps

CI should validate the updated component tests; after the author completes the required declarations, the PR can be marked ready for review.

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

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.

🟡 Changes recommended

The hamburger button lacks an initial aria-expanded="false" state, preventing screen readers from announcing the collapsed drawer before the first toggle; initialize it and add a render assertion.

1 open issue

Review effort: Balanced

@vnbaaij

Vincent Baaij (vnbaaij) commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Hi Jay (@jay23606),

You must follow the PR template for the description. We have checks running on AI submission and issue discussion requirements. These checks are failing now so we can't merge after review.

Also, please check Copilot's comment about initialization.

Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
@jay23606
Jay (jay23606) marked this pull request as draft November 23, 2026 08:45
@vnbaaij

Copy link
Copy Markdown
Collaborator

Jay (@jay23606) please check the appropriate checkboxes in the description

@dvoituron

Copy link
Copy Markdown
Collaborator

Jay (@jay23606) I have already discussed this issue in change request #5653.
Since Joseph has closed his change request, I have opened this new PR #5660, which incorporates your changes as well as some other features, I believe.

@vnbaaij

Copy link
Copy Markdown
Collaborator

Closing this one as it is rolled up into #5660. Thank you!

@jay23606
Jay (jay23606) deleted the pr-go/5644-fix-aria-expanded-is-set-on-the-role-les branch November 24, 2026 00:13
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.

fix: aria-expanded is set on the role-less wrapper div in FluentLayoutHamburger

4 participants