Repository navigation
feat: Complete FAB Menu behavior and web adaptation - #5170
Open
alpharius-ck wants to merge 5 commits into
Open
alpharius-ck wants to merge 5 commits into
alpharius-ck wants to merge 5 commits into
Conversation
|
Found potential problems with the pull request:
|
# Conflicts: # src/components/FAB/Shell.tsx
The previous merge of main kept the old versions of most files that changed on main. Bring the tree to main plus the FAB menu changes so the PR only shows the FAB files. Type the FAB refs with ComponentRef<typeof View> and ComponentRef<typeof ScrollView>, as main does, since View and ScrollView are no longer instance types on React Native 0.88. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Motivation
FAB.Menudid not follow the Material 3 spec or the other v6 components in a few ways. On web it did not tell assistive technology whether it was open. Collapsed items stayed in the tab order and the accessibility tree. Items had no hover, focus or press feedback, and a menu taller than the screen could not scroll.This PR fixes those. Dismissal (Escape, Android back, outside press, screen reader escape) and focus handling (focus on open, restore on close) are intentionally left out and belong to the overlay work in #5127. A follow-up will wire
FAB.Menuinto that portal stack. Until then, the menu closes only through its trigger and items, as onmain.Builds on #5110 (variant rename). It also covers the
aria-expandedchange from #5151, so one of the two should be dropped when they land.Related issue
https://app.notion.com/p/callstack/Complete-FAB-Menu-behavior-and-web-adaptation-3ac5d027c0f8806ba4f8f5a8cc061eac?v=3285d027c0f880a68ccb000c1ce3c56e&source=copy_link
Screenshots / Videos
Test plan
Use the example app:
FAB→menu(yarn example web,yarn example ios,yarn example android).Web
aria-expanded="false"andaria-haspopup="menu". After opening, it hasaria-expanded="true", and the items container hasrole="menu".iOS / Android
adb shell wm size 1080x1000), the items scroll to the last one. Reopening starts at the top.