Skip to content

Commit

Permalink
fix(material/dialog): dialog name not read by screenreader on macos u…
Browse files Browse the repository at this point in the history
…sing chrome or firefox

Updates fix for Angular Components Dialog issue where the dialog name
is not being read by the screenreader when specifically using macos
(and potentially ios) screenreader when using chrome or firefox
browsers. Removes unused commented out code and includes ios as part
of the logic to call  _getDialogName().

Fixes b/274674581
  • Loading branch information
essjay05 committed Jul 2, 2024
1 parent 8cbf870 commit bd8b33f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/material/dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ export class MatDialogContainer
: 0;
/** Current timer for dialog animations. */
private _animationTimer: ReturnType<typeof setTimeout> | null = null;
/** Platform Observer */
// private _userAgentSubscription = Subscription.EMPTY;
private _getWindow(): Window {
return this._document?.defaultView || window;
}
Expand Down Expand Up @@ -169,7 +167,7 @@ export class MatDialogContainer

private _setAriaLabel = (): void => {
const os = this._getUserPlatform();
if (os === 'macos') {
if (os === 'macos' || os === 'ios') {
this._getDialogName();
}
return;
Expand Down

0 comments on commit bd8b33f

Please sign in to comment.