MudSelect: Mirror combobox semantics onto the hidden-input presenter

Merged
DA
5mo ago
+67-0

MudSelect already exposes combobox/listbox semantics on the standard input path, but the custom-rendered value path still uses MudInput with InputType.Hidden. In that mode, focus lands on the rendered presenter div, not the hidden input, so screen readers still missed the same trigger semantics on the actual focused element. This PR mirrors the accessibility-facing trigger attributes onto that focused presenter element.

The earlier #13066 work fixed the standard input path, but not the custom-rendered presenter path. That meant a MudSelect with custom child content could still expose an under-described focused element to assistive tech even though the popup/listbox wiring existed elsewhere.

Part of #9717.

Changes:

  • Mirror role and aria-* trigger attributes onto the focusable display element used by MudInput when InputType.Hidden and ChildContent are used.
  • Keep generated attributes as fallbacks so caller-provided UserAttributes still take precedence.
  • Add a focused test for the custom-rendered MudSelect presenter path.

Checklist:

  • I've read the contribution guidelines
  • My code follows the style of this project
  • I've added or updated relevant unit tests