ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

fix(ui5-file-uploader): announce value state message to screen readers

Open unazko opened this issue 5 months ago • 1 comments

Issue:

  • The value state message of ui5-file-uploader was not announced by screen readers (NVDA, JAWS) when the component received focus.
  • Unlike ui5-input, the native input type file had no aria-describedby link to the value state text, so AT had no way to discover the message regardless of whether the visual popover was open.

Solution:

  • Added an ariaValueStateHiddenText getter that composes the full AT announcement string from the value state type label and the message text, mirroring the existing pattern in ui5-input.
  • Added ariaDescribedBy to accInfo, pointing to valueStateDesc when a value state is active.
  • Added a hidden span with id valueStateDesc in FileUploaderTemplate within the same shadow root as the native input, so the aria-describedby reference resolves correctly across renders.
  • The hidden span is intentionally placed in FileUploaderTemplate and not in FileUploaderPopoverTemplate, as aria-describedby cannot cross shadow DOM boundaries into the popover's own shadow root.

Fixed: https://github.com/UI5/webcomponents/issues/13549

unazko avatar Jun 28 '26 09:06 unazko

🚀 Deployed on https://pr-13759--ui5-webcomponents-preview.netlify.app