Skip to content

Commit dbd54f7

Browse files
authored
[Auth] Add tabindex=-1 to iframe to fix issue with aria-hidden (#5700)
* Add tabindex=-1 to iframe to fix issue with aria-hidden * Add changeset
1 parent ee440a8 commit dbd54f7

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/witty-kids-buy.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/auth": patch
3+
---
4+
5+
Fix lighthouse issues related to the embedded iframe used to perform OAuth sign in.

packages/auth/src/platform_browser/iframe/iframe.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ describe('platform_browser/iframe/iframe', () => {
8686
height: '1px'
8787
},
8888
'aria-hidden': 'true',
89+
tabindex: '-1'
8990
});
9091
expect(iframeSettings.dontclear).to.be.true;
9192
});

packages/auth/src/platform_browser/iframe/iframe.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const IFRAME_ATTRIBUTES = {
3838
width: '1px',
3939
height: '1px'
4040
},
41-
'aria-hidden': 'true'
41+
'aria-hidden': 'true',
42+
tabindex: '-1'
4243
};
4344

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

0 commit comments

Comments
 (0)