Skip to content

Commit

Permalink
Port 'Updated ComboBox error to have role="alert"' to 7.0 (#20032)
Browse files Browse the repository at this point in the history
* Port 'Updated ComboBox error to have role="alert" (#20013)' to 7.0

* Change files

* Update experiment snapshot

* Change files

Co-authored-by: GeoffCox <[email protected]>
  • Loading branch information
GeoffCoxMSFT and GeoffCox authored Sep 29, 2021
1 parent f05c10e commit 863c862
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Port 'Updated ComboBox error to have role=\"alert\" (#20013)' to 7.0",
"packageName": "@fluentui/react-examples",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Update experiment snapshot",
"packageName": "@uifabric/experiments",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Port 'Updated ComboBox error to have role=\"alert\" (#20013)' to 7.0",
"packageName": "office-ui-fabric-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1710,15 +1710,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = `
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox6-error"
role="region"
>
</div>
</div>
<button
aria-label="next page"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,11 @@ export class ComboBox extends React.Component<IComboBoxProps, IComboBoxState> {
},
this._onRenderContainer,
)}
<div
role="region"
aria-live="polite"
aria-atomic="true"
id={errorMessageId}
className={hasErrorMessage ? this._classNames.errorMessage : ''}
>
{errorMessage !== undefined ? errorMessage : ''}
</div>
{hasErrorMessage && (
<div role="alert" id={errorMessageId} className={this._classNames.errorMessage}>
{errorMessage}
</div>
)}
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,6 @@ exports[`ComboBox Renders correctly 1`] = `
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>
</div>
</div>
`;
Expand Down Expand Up @@ -735,14 +726,5 @@ exports[`ComboBox renders with a Keytip correctly 1`] = `
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,6 @@ exports[`Component Examples renders ComboBox.Basic.Example.tsx correctly 1`] = `
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
<button
className=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,5 @@ exports[`Component Examples renders ComboBox.Controlled.Example.tsx correctly 1`
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,5 @@ exports[`Component Examples renders ComboBox.ControlledMulti.Example.tsx correct
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,6 @@ exports[`Component Examples renders ComboBox.CustomStyled.Example.tsx correctly
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
<div
className="ms-ComboBox-container "
Expand Down Expand Up @@ -818,15 +809,6 @@ exports[`Component Examples renders ComboBox.CustomStyled.Example.tsx correctly
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox4-error"
role="region"
>

</div>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ exports[`Component Examples renders ComboBox.ErrorHandling.Example.tsx correctly
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=

{
Expand All @@ -341,7 +339,7 @@ exports[`Component Examples renders ComboBox.ErrorHandling.Example.tsx correctly
margin-top: 5px;
}
id="ComboBox0-error"
role="region"
role="alert"
>
Oh no! This ComboBox has an error!
</div>
Expand Down Expand Up @@ -734,15 +732,6 @@ exports[`Component Examples renders ComboBox.ErrorHandling.Example.tsx correctly
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox4-error"
role="region"
>

</div>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -417,15 +417,6 @@ exports[`Component Examples renders ComboBox.Toggles.Example.tsx correctly 1`] =
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
<div
className=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,6 @@ exports[`Component Examples renders ComboBox.Virtualized.Example.tsx correctly 1
</span>
</button>
</div>
<div
aria-atomic="true"
aria-live="polite"
className=""
id="ComboBox0-error"
role="region"
>

</div>
</div>
</div>
`;

0 comments on commit 863c862

Please sign in to comment.