mirror of
https://github.com/desktop/desktop
synced 2024-10-31 11:07:25 +00:00
docs
This commit is contained in:
parent
45be9fbc9b
commit
e4e53c693d
1 changed files with 10 additions and 3 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue