Skip to content

Commit 32e8db7

Browse files
authored
Fix 400%/320px reflow and title accessibility of survey (#6021)
* Ensure survey page is 400%/320px Reflow compliant * Add aria-level attribute to survey title for improved accessibility * Change files
1 parent 6340f1b commit 32e8db7

4 files changed

Lines changed: 20 additions & 3 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": "End-call survey",
5+
"comment": "Ensure survey page is 400%/320px Reflow compliant and add aria-level attribute to survey title for improved accessibility",
6+
"packageName": "@azure/communication-react",
7+
"email": "miguelgamis@microsoft.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-composites/src/composites/CallComposite/pages/SurveyPage.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ export interface SurveyPageProps {
6969
export function SurveyPage(props: SurveyPageProps): JSX.Element {
7070
const handlers = useHandlers(Survey);
7171
return (
72-
<Stack verticalFill verticalAlign="center" horizontalAlign="center" data-ui-id={props.dataUiId} aria-atomic>
72+
<Stack
73+
verticalFill
74+
verticalAlign="center"
75+
horizontalAlign="center"
76+
data-ui-id={props.dataUiId}
77+
aria-atomic
78+
// Ensure the survey page resizes correctly in CallComposite when the viewport size changes
79+
styles={{ root: { contain: 'inline-size' } }}
80+
>
7381
<Stack className={mergeStyles(containerStyle)} tokens={containerItemGap}>
7482
<Survey
7583
{...handlers}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const mainScreenContainerStyle: IStyle = {
1515
*/
1616
export const mainScreenContainerStyleDesktop = mergeStyles({
1717
...mainScreenContainerStyle,
18-
minWidth: '20rem', // max of min-width of composite pages (Call page) 400% zoom compliant size
18+
minWidth: 'min(20rem, calc(100vw - 1rem))', // 400% zoom compliant, accounts for potential vertical scrollbar
1919
minHeight: '16rem' // max height of min-height of composite pages (Configuration page) 400% zoom compliant size
2020
});
2121

packages/react-composites/src/composites/common/Survey.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const Survey = (props: {
8383
)}
8484
{!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (
8585
<Stack verticalAlign="center" className={surveyContainerStyle(!!isMobile)}>
86-
<Text className={questionTextStyle(theme)} role="heading">
86+
<Text className={questionTextStyle(theme)} role="heading" aria-level={1}>
8787
{strings.surveyTitle}
8888
</Text>
8989
<SurveyContent

0 commit comments

Comments
 (0)