Stabilise React useId values in DOM snapshots in element-web (#33579)

* Stabilise React useId values in DOM snapshots - app/web

* Stabilise React useId values in DOM snapshots - shared components

* Update additional snapshots

* Added comments and changed replace pattern to 'react-use-id-N'
This commit is contained in:
rbondesson
2026-05-21 13:30:05 +01:00
committed by GitHub
parent 7ce368537b
commit 80024991aa
95 changed files with 1247 additions and 1173 deletions
@@ -27,14 +27,14 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
aria-label="Options"
class="mx_AccessibleButton mx_BaseCard_header_title_button--option"
data-state="closed"
id="radix-_r_0_"
id="radix-react-use-id-1"
role="button"
tabindex="0"
type="button"
/>
</div>
<button
aria-labelledby="_r_2_"
aria-labelledby="react-use-id-2"
class="_icon-button_1215g_8"
data-kind="secondary"
data-testid="base-card-close-button"
@@ -177,7 +177,7 @@ exports[`AppTile for a pinned widget should render 1`] = `
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
data-state="closed"
id="radix-_r_1k_"
id="radix-react-use-id-1"
role="button"
tabindex="0"
type="button"
@@ -293,7 +293,7 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
data-state="closed"
id="radix-_r_30_"
id="radix-react-use-id-1"
role="button"
tabindex="0"
type="button"
@@ -349,8 +349,8 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
<span>
Using this widget may share data
<div
aria-describedby="_r_33_"
aria-labelledby="_r_32_"
aria-describedby="react-use-id-2"
aria-labelledby="react-use-id-3"
class="mx_TextWithTooltip_target mx_TextWithTooltip_target--helpIcon"
>
<svg
@@ -488,7 +488,7 @@ exports[`AppTile preserves non-persisted widget on container move 1`] = `
aria-label="Options"
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
data-state="closed"
id="radix-_r_10_"
id="radix-react-use-id-1"
role="button"
tabindex="0"
type="button"
@@ -3,7 +3,7 @@
exports[`<FacePile /> renders with a tooltip 1`] = `
<DocumentFragment>
<div
aria-labelledby="_r_0_"
aria-labelledby="react-use-id-1"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@@ -21,7 +21,7 @@ exports[`<ImageView /> renders correctly 1`] = `
class="mx_ImageView_toolbar"
>
<div
aria-describedby="_r_2_"
aria-describedby="react-use-id-1"
aria-label="Zoom out"
class="mx_AccessibleButton mx_ImageView_button"
role="button"
@@ -3,7 +3,7 @@
exports[`InfoTooltip should show tooltip on hover 1`] = `
<DocumentFragment>
<div
aria-describedby="_r_2_"
aria-describedby="react-use-id-1"
class="mx_InfoTooltip"
tabindex="0"
>
@@ -18,7 +18,7 @@ exports[`<LabelledCheckbox /> should render with byline of "this is a byline" 1`
class="_container_153f2_10"
>
<input
aria-describedby="_r_4_"
aria-describedby="react-use-id-1"
checked=""
class="_input_153f2_18"
id="checkbox_vY7Q4uEh9K"
@@ -57,7 +57,7 @@ exports[`<LabelledCheckbox /> should render with byline of "this is a byline" 1`
</label>
<span
class="_message_19upo_85 _help-message_19upo_91"
id="_r_4_"
id="react-use-id-1"
>
this is a byline
</span>
@@ -3,8 +3,8 @@
exports[`<RoomFacePile /> renders 1`] = `
<DocumentFragment>
<div
aria-describedby="_r_1_"
aria-labelledby="_r_0_"
aria-describedby="react-use-id-1"
aria-labelledby="react-use-id-2"
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
@@ -7,7 +7,7 @@ exports[`<SettingsDropdown /> should render a disabled setting 1`] = `
>
<label
class="mx_SettingsDropdown_label"
for="_r_0_"
for="react-use-id-1"
>
<span
class="mx_SettingsDropdown_labelText"
@@ -19,12 +19,12 @@ exports[`<SettingsDropdown /> should render a disabled setting 1`] = `
class="mx_Dropdown mx_Dropdown_disabled"
>
<div
aria-describedby="_r_0__value"
aria-describedby="react-use-id-1_value"
aria-disabled="true"
aria-expanded="false"
aria-haspopup="listbox"
aria-label="Open %(brand)s when you log in to your computer"
aria-owns="_r_0__input"
aria-owns="react-use-id-1_input"
class="mx_AccessibleButton mx_Dropdown_input mx_no_textinput mx_AccessibleButton_disabled"
disabled=""
role="button"
@@ -32,7 +32,7 @@ exports[`<SettingsDropdown /> should render a disabled setting 1`] = `
>
<div
class="mx_Dropdown_option"
id="_r_0__value"
id="react-use-id-1_value"
>
<div>
No
@@ -10,7 +10,7 @@ exports[`<SettingsField /> should render with the default label 1`] = `
>
<label
class="_label_19upo_59"
for="radix-_r_0_"
for="radix-react-use-id-1"
>
Element Call URL
</label>
@@ -19,7 +19,7 @@ exports[`<SettingsField /> should render with the default label 1`] = `
>
<input
class="_control_d83jn_10"
id="radix-_r_0_"
id="radix-react-use-id-1"
name="input"
title=""
value=""