Skip to content

Commit

Permalink
fix(ssr): global attribute disparities (#5247)
Browse files Browse the repository at this point in the history
* chore: testing hydration

* chore: added tests

* chore: added dedicated tests for v1/2 delta

* chore: modified public property test

* fix: tabindex corrections, additional tests

* chore: minor corrections

* fix: prettier

* chore: update undeclared test

* fix: hydration test

* chore: added hydration tests and v1/2 pathing

* chore: test debug

* chore: check error length

* chore: revert hydration failure test

* chore: change path strat

* chore: test correction, production mode
  • Loading branch information
jhefferman-sfdc authored Mar 1, 2025
1 parent 2937602 commit b5d54cd
Show file tree
Hide file tree
Showing 69 changed files with 2,558 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<fixture-test>
<template shadowrootmode="open">
<x-child accesskey="foo" aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" dir="foo" draggable="foo" exportparts="foo" id="foo" lang="foo" role="foo" spellcheck="foo" tabindex="foo" title="foo">
<x-child accesskey="foo" aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" dir="foo" exportparts="foo" id="foo" lang="foo" role="foo" title="foo">
<template shadowrootmode="open">
<span>
accessKey: foo
Expand Down Expand Up @@ -56,9 +56,6 @@
<span>
ariaHasPopup: foo
</span>
<span>
ariaHidden: foo
</span>
<span>
ariaInvalid: foo
</span>
Expand Down Expand Up @@ -191,9 +188,6 @@
<span>
disabled:
</span>
<span>
draggable: false
</span>
<span>
enterkeyhint:
</span>
Expand Down Expand Up @@ -305,12 +299,6 @@
<span>
selected:
</span>
<span>
spellcheck: true
</span>
<span>
tabIndex: -1
</span>
<span>
textarea:
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<span>ariaExpanded: {ariaExpanded}</span>
<span>ariaFlowTo: {ariaFlowTo}</span>
<span>ariaHasPopup: {ariaHasPopup}</span>
<span>ariaHidden: {ariaHidden}</span>
<span>ariaInvalid: {ariaInvalid}</span>
<span>ariaKeyShortcuts: {ariaKeyShortcuts}</span>
<span>ariaLabel: {ariaLabel}</span>
Expand Down Expand Up @@ -62,7 +61,6 @@
<span>details: {details}</span>
<span>dir: {dir}</span>
<span>disabled: {disabled}</span>
<span>draggable: {draggable}</span>
<span>enterkeyhint: {enterkeyhint}</span>
<span>exportparts: {exportparts}</span>
<span>fieldset: {fieldset}</span>
Expand Down Expand Up @@ -100,11 +98,9 @@
<span>rowSpan: {rowSpan}</span>
<span>select: {select}</span>
<span>selected: {selected}</span>
<span>spellcheck: {spellcheck}</span>
<span>tabIndex: {tabIndex}</span>
<span>textarea: {textarea}</span>
<span>title: {title}</span>
<span>translate: {translate}</span>
<span>useMap: {useMap}</span>
<span>video: {video}</span>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<template>
<!--
Please Note: There are dedicated tests for the following due to V1/2 disparities:
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/draggable
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/hidden
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/spellcheck
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/tabindex
-->
<x-child
accesskey={dynamic}
aria-activedescendant={dynamic}
Expand Down Expand Up @@ -62,14 +69,12 @@
details={dynamic}
dir={dynamic}
disabled={dynamic}
draggable={dynamic}
enterkeyhint={dynamic}
exportparts={dynamic}
fieldset={dynamic}
form={dynamic}
formaction={dynamic}
formnovalidate={dynamic}
hidden={dynamic}
id={dynamic}
input={dynamic}
inputmode={dynamic}
Expand Down Expand Up @@ -100,12 +105,10 @@
rowspan={dynamic}
select={dynamic}
selected={dynamic}
spellcheck={dynamic}
tabindex={dynamic}
textarea={dynamic}
title={dynamic}
translate={dynamic}
usemap={dynamic}
video={dynamic}
></x-child>
</template>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"entry": "x/component",
"ssrFiles": {
"error": "error-ssr.txt",
"expected": "expected-ssr.html"
}
}
Loading

0 comments on commit b5d54cd

Please sign in to comment.