From f2bccb341d3a847b405be19c0ec28cef4d9aa461 Mon Sep 17 00:00:00 2001 From: beeps Date: Mon, 21 Oct 2024 09:33:08 +0100 Subject: [PATCH] Remove setting aria-hidden Chromium actively ignores this attribute on file inputs and throws a warning in the console --- .../src/govuk/components/file-upload/file-upload.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.mjs b/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.mjs index eb696558aa..f59f84eb9c 100644 --- a/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.mjs +++ b/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.mjs @@ -107,8 +107,7 @@ export class FileUpload extends GOVUKFrontendComponent { this.$button = $button this.$status = $status - // with everything set up, apply attributes to programmatically hide the input - this.$root.setAttribute('aria-hidden', 'true') + // Prevent the hidden input being tabbed to by keyboard users this.$root.setAttribute('tabindex', '-1') // Bind change event to the underlying input