Skip to content

Commit bf35fda

Browse files
[A11y bugfix] EndCall button high contrast appearence (#3905)
* update end call css per A11y * Change files * Duplicate change files for beta release * adjust css for Configuration title to also respect the a11y colors * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots * Update packages/react-composites CallComposite browser test snapshots --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1c5d423 commit bf35fda

4 files changed

Lines changed: 32 additions & 6 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "A11y",
5+
"comment": "Update EndCall button appearence to match high contrast expectations on windows",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "A11y",
5+
"comment": "Update EndCall button appearence to match high contrast expectations on windows",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/EndCallButton.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,23 @@ const darkThemeCallButtonStyles = {
8080
color: darkTheme.callingPalette.iconWhite,
8181
background: darkTheme.callingPalette.callRed,
8282
'@media (forced-colors: active)': {
83-
forcedColorAdjust: 'none'
83+
forcedColorAdjust: 'auto',
84+
border: `1px ${lightTheme.palette?.neutralQuaternaryAlt} solid`
8485
},
8586
':focus::after': { outlineColor: `${darkTheme.callingPalette.iconWhite} !important` } // added !important to avoid override by FluentUI button styles
8687
},
8788
rootHovered: {
8889
color: darkTheme.callingPalette.iconWhite,
8990
background: darkTheme.callingPalette.callRed,
9091
'@media (forced-colors: active)': {
91-
forcedColorAdjust: 'none'
92+
forcedColorAdjust: 'auto'
9293
}
9394
},
9495
rootPressed: {
9596
color: darkTheme.callingPalette.iconWhite,
9697
background: darkTheme.callingPalette.callRed,
9798
'@media (forced-colors: active)': {
98-
forcedColorAdjust: 'none'
99+
forcedColorAdjust: 'auto'
99100
}
100101
},
101102
label: {
@@ -108,22 +109,23 @@ const lightThemeCallButtonStyles = {
108109
color: lightTheme.callingPalette.iconWhite,
109110
background: lightTheme.callingPalette.callRed,
110111
'@media (forced-colors: active)': {
111-
forcedColorAdjust: 'none'
112+
forcedColorAdjust: 'auto',
113+
border: `1px ${lightTheme.palette?.neutralQuaternaryAlt} solid`
112114
},
113115
':focus::after': { outlineColor: `${lightTheme.callingPalette.iconWhite} !important` } // added !important to avoid override by FluentUI button styles
114116
},
115117
rootHovered: {
116118
color: lightTheme.callingPalette.iconWhite,
117119
background: lightTheme.callingPalette.callRed,
118120
'@media (forced-colors: active)': {
119-
forcedColorAdjust: 'none'
121+
forcedColorAdjust: 'auto'
120122
}
121123
},
122124
rootPressed: {
123125
color: lightTheme.callingPalette.iconWhite,
124126
background: lightTheme.callingPalette.callRed,
125127
'@media (forced-colors: active)': {
126-
forcedColorAdjust: 'none'
128+
forcedColorAdjust: 'auto'
127129
}
128130
},
129131
label: {

packages/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ const configurationPageTextDecoration = (theme: ITheme): IStyle => {
158158
strokeWidth: _pxToRem(1.5),
159159
text: {
160160
letterSpacing: '-0.02rem' // cope with extra width due to stroke width
161+
},
162+
'@media (forced-colors: active)': {
163+
forcedColorAdjust: 'auto',
164+
fill: theme.palette.neutralQuaternaryAlt,
165+
textShadow: 'none',
166+
stroke: 'none'
161167
}
162168
};
163169
};

0 commit comments

Comments
 (0)