Skip to content

Commit

Permalink
Merged PR 22890: Set embed component tab Index
Browse files Browse the repository at this point in the history
Set embed component tab Index
  • Loading branch information
laurent-mic committed Mar 26, 2019
1 parent 73218d1 commit eadb4be
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 9 deletions.
10 changes: 9 additions & 1 deletion dist/powerbi-client.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.7.2 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.7.3 | (c) 2016 Microsoft Corporation MIT */
declare module "util" {
import { HttpPostMessage } from 'http-post-message';
/**
Expand Down Expand Up @@ -413,6 +413,14 @@ declare module "embed" {
* Sets Iframe's title
*/
setComponentTitle(title: string): void;
/**
* Sets elements's tabindex attribute
*/
setComponentTabIndex(tabIndex?: number): void;
/**
* Removes element's tabindex attribute
*/
removeComponentTabIndex(tabIndex?: number): void;
/**
* Adds the ability to get groupId from url.
* By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
Expand Down
22 changes: 20 additions & 2 deletions dist/powerbi.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/powerbi.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-client",
"version": "2.7.2",
"version": "2.7.3",
"description": "JavaScript library for embedding Power BI into your apps. Provides service which makes it easy to embed different types of components and an object model which allows easy interaction with these components such as changing pages, applying filters, and responding to data selection.",
"main": "dist/powerbi.js",
"typings": "dist/powerbi-client.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = {
version: '2.7.2',
version: '2.7.3',
type: 'js'
};

Expand Down
20 changes: 20 additions & 0 deletions src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,26 @@ export abstract class Embed {
}
}

/**
* Sets element's tabindex attribute
*/
setComponentTabIndex(tabIndex?: number): void {
if(!this.element) {
return;
}
this.element.setAttribute("tabindex", (tabIndex == null) ? "0" : tabIndex.toString());
}

/**
* Removes element's tabindex attribute
*/
removeComponentTabIndex(tabIndex?: number): void {
if(!this.element) {
return;
}
this.element.removeAttribute("tabindex");
}

/**
* Adds the ability to get groupId from url.
* By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
Expand Down

0 comments on commit eadb4be

Please sign in to comment.