diff --git a/change/@fluentui-react-drawer-b7d10669-1f23-47cb-bc3e-21e001e940f1.json b/change/@fluentui-react-drawer-b7d10669-1f23-47cb-bc3e-21e001e940f1.json
new file mode 100644
index 00000000000000..d680d56f4909d0
--- /dev/null
+++ b/change/@fluentui-react-drawer-b7d10669-1f23-47cb-bc3e-21e001e940f1.json
@@ -0,0 +1,7 @@
+{
+ "type": "prerelease",
+ "comment": "fix: improve high contrast mode",
+ "packageName": "@fluentui/react-drawer",
+ "email": "marcosvmmoura@gmail.com",
+ "dependentChangeType": "patch"
+}
diff --git a/packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.cy.tsx b/packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.cy.tsx
index e3723743604dad..383c7ffcdd3d7d 100644
--- a/packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.cy.tsx
+++ b/packages/react-components/react-drawer/src/components/DrawerInline/DrawerInline.cy.tsx
@@ -14,25 +14,16 @@ describe('DrawerInline', () => {
testDrawerBaseScenarios(DrawerInline);
describe('separator prop', () => {
- it('should not render any border when separator is false', () => {
- mountFluent();
-
- cy.get('#drawer').should('not.have.css', `border-right-width`, '1px');
- cy.get('#drawer').should('not.have.css', `border-left-width`, '1px');
- });
-
it('should render correct border when when position is `start`', () => {
mountFluent();
- cy.get('#drawer').should('not.have.css', `border-left-width`, '1px');
- cy.get('#drawer').should('have.css', `border-right-width`, '1px');
+ cy.get('#drawer').should('not.have.css', `border-right-color`, 'transparent');
});
it('should render correct border when when position is `end`', () => {
mountFluent();
- cy.get('#drawer').should('not.have.css', `border-right-width`, '1px');
- cy.get('#drawer').should('have.css', `border-left-width`, '1px');
+ cy.get('#drawer').should('not.have.css', `border-left-color`, 'transparent');
});
});
});
diff --git a/packages/react-components/react-drawer/src/components/DrawerOverlay/useDrawerOverlayStyles.styles.ts b/packages/react-components/react-drawer/src/components/DrawerOverlay/useDrawerOverlayStyles.styles.ts
index 2ac2952e30e454..c893ee606d0113 100644
--- a/packages/react-components/react-drawer/src/components/DrawerOverlay/useDrawerOverlayStyles.styles.ts
+++ b/packages/react-components/react-drawer/src/components/DrawerOverlay/useDrawerOverlayStyles.styles.ts
@@ -59,6 +59,10 @@ const useBackdropStyles = makeStyles({
transitionProperty: 'opacity',
transitionTimingFunction: tokens.curveEasyEase,
willChange: 'opacity',
+
+ '@media screen and (prefers-reduced-motion: reduce)': {
+ transitionDuration: '0.001ms',
+ },
},
visible: {
diff --git a/packages/react-components/react-drawer/src/shared/useDrawerBaseStyles.styles.ts b/packages/react-components/react-drawer/src/shared/useDrawerBaseStyles.styles.ts
index 40fec51ab36a06..bfd606f08fcad2 100644
--- a/packages/react-components/react-drawer/src/shared/useDrawerBaseStyles.styles.ts
+++ b/packages/react-components/react-drawer/src/shared/useDrawerBaseStyles.styles.ts
@@ -48,10 +48,14 @@ const useDrawerStyles = makeStyles({
/* Positioning */
start: {
+ ...shorthands.borderRight(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),
+
left: 0,
right: 'auto',
},
end: {
+ ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),
+
right: 0,
left: 'auto',
},