MCPcopy Create free account
hub / github.com/angular/components / getRole

Method getRole

src/material/dialog/testing/dialog-harness.ts:58–60  ·  view source on GitHub ↗

Gets the role of the dialog.

()

Source from the content-addressed store, hash-verified

56
57 /** Gets the role of the dialog. */
58 async getRole(): Promise<DialogRole | null> {
59 return (await this.host()).getAttribute('role') as Promise<DialogRole | null>;
60 }
61
62 /** Gets the value of the dialog's "aria-label" attribute. */
63 async getAriaLabel(): Promise<string | null> {

Calls 1

getAttributeMethod · 0.65

Tested by

no test coverage detected