From fe6427be572f4b4f89841c96a85d880f584cc685 Mon Sep 17 00:00:00 2001 From: Ryan Southgate Date: Thu, 8 Dec 2016 20:21:47 +0000 Subject: [PATCH] added ariaLabelledBy and ariaDescribedBy to IModalSettings (#13004) --- .../angular-ui-bootstrap-tests.ts | 2 ++ angular-ui-bootstrap/angular-ui-bootstrap.d.ts | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index d92c90bc60..0056c70b52 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -154,6 +154,8 @@ testApp.controller('TestCtrl', ( * test the $modal service */ var modalInstance = $modal.open({ + ariaLabelledBy: "label", + ariaDescribedBy: "description", animation: false, backdrop: 'static', backdropClass: 'modal-backdrop-test', diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index d6c389146b..bffd665725 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -1,6 +1,6 @@ // Type definitions for Angular UI Bootstrap 0.13.3 // Project: https://github.com/angular-ui/bootstrap -// Definitions by: Brian Surowiec +// Definitions by: Brian Surowiec , Ryan Southgate // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -411,6 +411,22 @@ declare namespace angular.ui.bootstrap { * - `resolve` - An object of the modal resolve values. See [UI Router resolves] for details. */ component?: string; + + /** + * Sets the `aria-describedby` property on the modal. + * The string should be an id (without the leading '#') pointing to the element that describes your modal. + * @type {string} + * @memberOf IModalSettings + */ + ariaDescribedBy?: string; + + /** + * Sets the `aria-labelledby` property on the modal. + * The string should be an id (without the leading '#') pointing to the element that labels your modal. + * @type {string} + * @memberOf IModalSettings + */ + ariaLabelledBy?: string; } interface IModalStackService {