fix: emit skipped component attrs with static and embedded values#173
Merged
mohamedmansour merged 2 commits intomainfrom Apr 6, 2026
Merged
fix: emit skipped component attrs with static and embedded values#173mohamedmansour merged 2 commits intomainfrom
mohamedmansour merged 2 commits intomainfrom
Conversation
Previously, skipped component attributes (class, style, role, data-*,
aria-*) were only emitted when they contained a pure handlebars binding
like role="{{dynamicRole}}". Static values (role="list") and embedded
bindings (aria-labelledby="prefix-{{id}}") were silently dropped.
Now all three forms are emitted as attribute fragments:
- Pure binding: attr_skip with value (existing behavior)
- Embedded binding: attr_skip with template sub-stream
- Static value: attr_skip with raw_value flag
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohamedmansour
previously approved these changes
Apr 6, 2026
mohamedmansour
approved these changes
Apr 6, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix skipped component attributes (class, style, role, data-, aria-) to emit fragments for all value types, not just pure handlebars bindings.
Problem
When a component element has skipped attributes with static or mixed values, the parser silently dropped them:
role="list"dropped (static value)aria-labelledby="prefix-{{id}}"dropped (embedded binding)role="{{dynamicRole}}"emitted (pure binding, already worked)This meant the handler never saw these attributes, so they couldn't be rendered in the SSR output.
Fix
All three forms now emit attribute fragments with
attr_skip: true:role="{{x}}"value: "x"(unchanged)aria-label="pre-{{id}}"template: "attr-N"(sub-stream with static + signal parts)role="list"value: "list", raw_value: trueChanges
attr_skip_rawandattr_skip_templatetest matcherstest_component_attr_skip_static_and_embeddedcovering all three forms with template sub-stream verification