Skip to content

Commit

Permalink
[Auth] Add tabindex=-1 to iframe to fix issue with aria-hidden (#5700)
Browse files Browse the repository at this point in the history
* Add tabindex=-1 to iframe to fix issue with aria-hidden

* Add changeset
  • Loading branch information
sam-gc committed Nov 4, 2021
1 parent ee440a8 commit dbd54f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/witty-kids-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/auth": patch
---

Fix lighthouse issues related to the embedded iframe used to perform OAuth sign in.
1 change: 1 addition & 0 deletions packages/auth/src/platform_browser/iframe/iframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ describe('platform_browser/iframe/iframe', () => {
height: '1px'
},
'aria-hidden': 'true',
tabindex: '-1'
});
expect(iframeSettings.dontclear).to.be.true;
});
Expand Down
3 changes: 2 additions & 1 deletion packages/auth/src/platform_browser/iframe/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const IFRAME_ATTRIBUTES = {
width: '1px',
height: '1px'
},
'aria-hidden': 'true'
'aria-hidden': 'true',
tabindex: '-1'
};

// Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to
Expand Down

0 comments on commit dbd54f7

Please sign in to comment.