Open dlockhart opened 7 years ago
Option #1 may work due to the browser doing some magic for labels. I'm not sure if this sort of approach would buy us anything for description though. Option #2 could work also for description by taking a description attribute and rendering an offscreen element inside the shadow-DOM, and doing the wire-up for aria-describedby
.
Both
aria-labelledby
andaria-describedby
won't work with web components and shadow DOM, because the IDs of those elements are out of scope.2 potential solutions:
Not sure that'll work, but if inside
<d2l-label>
it renders an actual<label>
element, it might.Like this:
<d2l-text-input label="label for input">
. We'd then need to handle various different kinds of labels eventually -- above, beside, etc. Probably needs more thought around how this can be shared across many different kinds of inputs.@dbatiste @pbrown-d2l