Skip to content

Commit

Permalink
Add title to iframe for a11y (#158)
Browse files Browse the repository at this point in the history
* Add title to iframe for a11y

* Use patch version
  • Loading branch information
jamesdools-whereby authored Dec 11, 2023
1 parent cbdbda1 commit 580f609
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/__tests__/index.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe("@whereby/browser-sdk", () => {
"virtualbackgroundurl",
"avatarurl",
"externalid",
"title",
"audio",
"background",
"cameraaccess",
Expand Down
3 changes: 3 additions & 0 deletions src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ define("WherebyEmbed", {
"virtualBackgroundUrl",
"avatarUrl",
"externalId",
"title",
...boolAttrs,
].map((a) => a.toLowerCase()),
onattributechanged({ attributeName, oldValue }) {
Expand Down Expand Up @@ -115,6 +116,7 @@ define("WherebyEmbed", {
room,
groups,
virtualbackgroundurl: virtualBackgroundUrl,
title,
} = this;
let roomUrl, subdomain;

Expand Down Expand Up @@ -151,6 +153,7 @@ define("WherebyEmbed", {
});
this.html`
<iframe
title=${title || "Video calling component"}
ref=${this.iframe}
src=${this.roomUrl}
allow="autoplay; camera; microphone; fullscreen; speaker; display-capture" />
Expand Down

0 comments on commit 580f609

Please sign in to comment.