Closed brianchristopherbrady closed 2 weeks ago
🤖 This report was generated against c991463ca01e86e4c6b3e5ff0ed9093de0d7e1e5
Size Auditor did not detect a change in bundle size for any component!
Baseline commit: c991463ca01e86e4c6b3e5ff0ed9093de0d7e1e5 (build)
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 838e65c832c412b9ae162cce04e55f6f16c2930e:
Sandbox | Source |
---|---|
@fluentui/react 8 starter | Configuration |
@fluentui/react-components 9 starter | Configuration |
@brianchristopherbrady closing as that is the only way to stop notifying reviewers. Please update your PR to point to master following this guide: https://github.com/microsoft/fluentui/pull/31361 and reopen when it's updated. Thanks!
Change to Dialog's Close Button Implementation in WC3
In the Fluent v9 implementation of the Dialog, setting the modalType to 'non-modal' triggers the display of a default close button. However, considering specific concerns inherent to web components, it's advisable not to replicate this exact behavior for the WC3 version.
This PR introduces the close slot in the dialog, offering developers the flexibility to specify their own close button content. The driving factors for this change are rooted in both accessibility (a11y) and performance implications associated with interactive elements in the shadowDOM.
Performance Considerations
Dynamic element generation can prompt unwanted reflows and repaints within the browser's rendering process. The intricacies are magnified when these elements reside within the shadowDOM, given its encapsulating nature. Through the provision of a close slot, developers can embed their custom close buttons, thus sidestepping potential performance issues.
Accessibility Considerations
Interactive components within the shadowDOM can sometimes interact inconsistently with assistive tools such as screen readers. The shadowDOM's encapsulated environment could challenge these tools in correctly identifying and engaging with the incorporated elements. By designating a dedicated slot for the close button that's external to the shadowDOM, we aim to deliver a more uniform and accessible user experience.