Created
June 16, 2022 20:19
-
-
Save nolanlawson/2346b6681c3543e91cc827ba36aad386 to your computer and use it in GitHub Desktop.
delegation
This file contains 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
<!-- delegation --> | |
<x-input aria-labelledby="foo"> | |
#shadow-root | |
<input type=text autoarialabelledby> <!-- delegates aria-labelledby to the host --> | |
</x-input> | |
<!-- reflection --> | |
<x-label id="foo"> | |
#shadow-root reflects=ariaLabelledBy | |
<label reflectsAriaLabelledBy> <!-- reflects its "id" upward, in a sense --> | |
</x-label> |
Author
nolanlawson
commented
Jun 16, 2022
•
<!-- delegation -->
<x-input aria-labelledby="foo">
#shadow-root
<input type=text autoarialabelledby> <!-- delegates aria-labelledby to the host -->
</x-input>
<!-- reflection -->
<x-label id="foo">
#shadow-root reflects=ariaLabelledBy
<label reflectsAriaLabelledBy>content</label>
</x-label>
<label id="foo">content</label>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment