fix(ui5-file-uploader): replace aria-required with native required on shadow input#13846
Open
unazko wants to merge 3 commits into
Open
fix(ui5-file-uploader): replace aria-required with native required on shadow input#13846unazko wants to merge 3 commits into
unazko wants to merge 3 commits into
Conversation
…e required on shadow input Replace aria-required with the native required attribute on the internal <input type="file"> to improve accessibility announcements in Chromium-based browsers (Chrome/Edge), where aria-required is no longer announced by NVDA/JAWS for file inputs exposed as button role in the accessibility tree. This is a prototype for manual AT testing on Windows with NVDA/JAWS before merging. A test page with four scenarios covering ElementInternals validity, shadow input form isolation, required announcement, and premature invalid announcement has been added to the test page. Relates to: #13777 Relates to: #13305 Relates to: #13808
|
🚀 Deployed on https://pr-13846--ui5-webcomponents-preview.netlify.app |
… shadow input Issue: Chromium-based browsers (Chrome, Edge) no longer announce aria-required for <input type="file"> because the element is exposed as a button role in the accessibility tree, and aria-required is not a valid property for that role. As a result, NVDA and JAWS users on Chrome/Edge did not hear a "required" announcement for required file uploader fields. Solution: Replace aria-required with the native required attribute on the shadow <input type="file">. To prevent the native valueMissing state from causing a premature "invalid entry" announcement before user interaction, aria-invalid is explicitly set to false for all value states except Negative, where aria-invalid="true" is intentionally preserved. This keeps invalid state communication fully under application control, consistent with how other UI5 form components behave. Fixes: #13777 Relates to: #13305 Relates to: #13808
unazko
marked this pull request as ready for review
July 24, 2026 09:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Chromium-based browsers (Chrome, Edge) no longer announce aria-required
for because the element is exposed as a button role
in the accessibility tree, and aria-required is not a valid property for
that role. As a result, NVDA and JAWS users on Chrome/Edge did not hear
a "required" announcement for required file uploader fields.
Solution:
Replace aria-required with the native required attribute on the shadow
. To prevent the native valueMissing state from
causing a premature "invalid entry" announcement before user interaction,
aria-invalid is explicitly set to false for all value states except
Negative, where aria-invalid="true" is intentionally preserved. This
keeps invalid state communication fully under application control, consistent
with how other UI5 form components behave.
Fixes: #13777
Relates to: #13305
Relates to: #13808