Skip to content

v1.33.1

@unjong unjong tagged this 25 Aug 06:10
u-button renders a native <button> or <a> inside its shadow root. An
aria-label set on the host element never reached that internal
element, since ARIA content attributes do not cross a shadow
boundary to label a descendant — the host attribute was present, but
the accessible name computed for the actual focusable node stayed
empty. Icon-only buttons relying on aria-label were announced to
screen readers as unnamed controls.

render() now reads the host's aria-label and binds it directly onto
the internal element. Because aria-label isn't a Lit reactive
property, it wasn't part of observedAttributes either — attribute
changes made after the element connected were not observed at all,
so a static-only fix would have missed live updates. observedAttributes
now includes it explicitly.
Assets 2
Loading