This commit is contained in:
tidy-dev 2023-07-31 08:37:15 -04:00
parent 45be9fbc9b
commit e4e53c693d

View file

@ -714,7 +714,7 @@ export class Dialog extends React.Component<DialogProps, IDialogState> {
* Gets the aria-labelledby and aria-describedby attributes for the dialog
* element.
*
* The correct semantics are that the dialog element should have
* The correct semantics are that the dialog element should have the
* aria-labelledby and the aria-describedby is optional unless the dialog has
* a role of alertdialog, in which case both are required.
*
@ -725,13 +725,20 @@ export class Dialog extends React.Component<DialogProps, IDialogState> {
* this method will add the aria-labelledby to the aria-describedby in this
* case.
*
* For role of 'alertdialog', the aria-labelledby is announced by not the
* For role of 'alertdialog', the aria-labelledby is announced but not the
* aria-describedby. Thus, this method will add both to the
* aria-describedby.
* aria-labelledby.
*
* Neither of the above is semantically correct tho, hopefully, macOs will be
* fixed in a future release. The issue is known for macOS versions 13.0 to
* the current version of 13.5 as of 2023-07-31.
*
* A known macOS behavior is that if two ids are provided to the
* aria-describedby only the first one is announced with a note about the
* second one existing. This currently does not impact us as we only provide
* one id for non-alert dialogs and the alert dialogs are handled with the
* `aria-labelledby` where both ids are announced.
*
*/
private getAriaAttributes() {
if (!isMacOSVentura()) {