From 2429ac105b0aeb15eb8c362665448c209887bada Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 18 Oct 2021 14:27:04 -0700 Subject: [PATCH] [Auth] Add aria-hidden='true' attribute to embedded iframe (#5633) * Add aria-hidden='true' attribute to embedded iframe * Add changeset --- .changeset/olive-coats-deliver.md | 5 +++++ packages/auth/src/platform_browser/iframe/iframe.test.ts | 3 ++- packages/auth/src/platform_browser/iframe/iframe.ts | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/olive-coats-deliver.md diff --git a/.changeset/olive-coats-deliver.md b/.changeset/olive-coats-deliver.md new file mode 100644 index 00000000000..83501e5684b --- /dev/null +++ b/.changeset/olive-coats-deliver.md @@ -0,0 +1,5 @@ +--- +"@firebase/auth": patch +--- + +Add the attribute `aria-hidden="true"` to the embedded iframe diff --git a/packages/auth/src/platform_browser/iframe/iframe.test.ts b/packages/auth/src/platform_browser/iframe/iframe.test.ts index e5198e206ca..de0207ab3e8 100644 --- a/packages/auth/src/platform_browser/iframe/iframe.test.ts +++ b/packages/auth/src/platform_browser/iframe/iframe.test.ts @@ -84,7 +84,8 @@ describe('platform_browser/iframe/iframe', () => { top: '-100px', width: '1px', height: '1px' - } + }, + 'aria-hidden': 'true', }); expect(iframeSettings.dontclear).to.be.true; }); diff --git a/packages/auth/src/platform_browser/iframe/iframe.ts b/packages/auth/src/platform_browser/iframe/iframe.ts index e32615c7ece..86d4c5b228d 100644 --- a/packages/auth/src/platform_browser/iframe/iframe.ts +++ b/packages/auth/src/platform_browser/iframe/iframe.ts @@ -37,7 +37,8 @@ const IFRAME_ATTRIBUTES = { top: '-100px', width: '1px', height: '1px' - } + }, + 'aria-hidden': 'true' }; // Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to