Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update non-focus-trap Popover role to be group #24897

Merged
merged 3 commits into from
Sep 26, 2022

Conversation

smhigley
Copy link
Contributor

Related to #21416

We do want to use a non-dialog role for the non-focus-trapping variant, but complementary isn't the best fit -- it refers specifically to content that is complementary to the main region, and on the same level as the main region in content hierarchy. That doesn't really apply to most popovers, so this PR updates it to the group role for the following reasons:

  • Popovers may be nested, and group in particular enables that
  • It's the lowest common accessible base role in that it is flexible in its use cases, and allows naming & exposes its bounds
  • It is extremely flexible in allowed content (both in a strict spec sense, and in a general user expectation sense)

Other roles that were considered:

  • note: it generally seems fine, but it would be weird to have nested notes, and it has a narrow range of expected use cases
  • region: this would add popovers to the landmark list. It seems too heavy for something that is probably going to be a small, transient addition to the page, but we could reconsider it based on user feedback. The benefit would be that it would be easier to find with a screen reader's virtual cursor.

@smhigley smhigley self-assigned this Sep 21, 2022
@smhigley smhigley requested a review from a team as a code owner September 21, 2022 19:50
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 21, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.672 kB
52.359 kB
188.664 kB
52.353 kB
-8 B
-6 B
react-popover
Popover
102.963 kB
31.553 kB
102.955 kB
31.548 kB
-8 B
-5 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-alert
Alert
83.511 kB
20.921 kB
react-avatar
Avatar
48.381 kB
13.696 kB
react-avatar
AvatarGroup
14.95 kB
5.989 kB
react-avatar
AvatarGroupItem
68.349 kB
19.039 kB
react-components
react-components: FluentProvider & webLightTheme
33.394 kB
11.007 kB
react-portal-compat
PortalCompatProvider
5.851 kB
1.964 kB
🤖 This report was generated against 62aadfe9a8429fbc5c0660c1e741e5e8171f8f23

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 21, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d4d8c58:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Sep 21, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 62aadfe9a8429fbc5c0660c1e741e5e8171f8f23 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 21, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1584 1618 5000
Button mount 1179 1144 5000
FluentProvider mount 1912 1930 5000
FluentProviderWithTheme mount 767 760 10
FluentProviderWithTheme virtual-rerender 715 732 10
FluentProviderWithTheme virtual-rerender-with-unmount 766 769 10
MakeStyles mount 2323 2344 50000
SpinButton mount 3184 3085 5000

@smhigley smhigley merged commit bb8f6ad into microsoft:master Sep 26, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 28, 2022
* master: (21 commits)
  chore: Migrate react-avatar to use new build (microsoft#24969)
  applying package updates
  chore(react-input, react-textarea): Deprecating filled with shadow appearance variants (microsoft#24900)
  fix: v8 Dropdown no longer sets incorrect and unnecessary aria-activedescendant (microsoft#24593)
  feat: v0 Tooltip migration from v9 (microsoft#24908)
  chore: bump devDeps to fix critical security vulnerability (microsoft#24891)
  Fixing Tree chart issues (microsoft#24752)
  init: new package react-avatar-context (microsoft#24968)
  ci(.github): add issues write permisions to triage-bot worflow (microsoft#24963)
  applying package updates
  fix(Toolbar): close previous submenu when opening another submenu (microsoft#24836)
  fix: update non-focus-trap Popover role to be group (microsoft#24897)
  feat: Avatar's aria label includes 'active' or 'inactive' when using the active prop (microsoft#24901)
  feat(scripts): implement triage-bot module (microsoft#24911)
  chore: bump @octokit/rest to v18 (microsoft#24919)
  stress test: add "build-fixture" command (microsoft#24928)
  BREAKING-CHANGE: new ChatMessageContent for style caching (microsoft#24691)
  bugfix: fix changefile to properly update version of react-components with a patch (microsoft#24949)
  feat(scripts): enable strict checking for additional sub-folders(packages) (microsoft#24526)
  chore: exports DialogContent as unstable (microsoft#24943)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
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.

4 participants