Skip to content

[Auth] Add tabindex=-1 to iframe to fix issue with aria-hidden #5700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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