Skip to content

Commit b72c053

Browse files
authored
Add Close tooltip to dialog (#28617)
* Add `Close` tooltip to dialog * Update snapshots
1 parent 865c5b0 commit b72c053

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/components/views/dialogs/BaseDialog.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default class BaseDialog extends React.Component<IProps> {
119119
<AccessibleButton
120120
onClick={this.onCancelClick}
121121
className="mx_Dialog_cancelButton"
122+
title={_t("action|close")}
122123
aria-label={_t("dialog_close_label")}
123124
placement="bottom"
124125
/>

test/unit-tests/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ exports[`<UserInfo /> with crypto enabled renders <BasicUserInfo /> 1`] = `
8888
</p>
8989
</div>
9090
<button
91-
aria-labelledby=":r6s:"
91+
aria-labelledby=":r74:"
9292
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
9393
data-testid="base-card-close-button"
9494
role="button"
@@ -402,7 +402,7 @@ exports[`<UserInfo /> with crypto enabled should render a deactivate button for
402402
</p>
403403
</div>
404404
<button
405-
aria-labelledby=":r92:"
405+
aria-labelledby=":r9a:"
406406
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
407407
data-testid="base-card-close-button"
408408
role="button"

test/unit-tests/components/views/rooms/__snapshots__/RoomHeader-test.tsx.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
4747
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x);"
4848
>
4949
<button
50-
aria-labelledby=":r154:"
50+
aria-labelledby=":r16c:"
5151
class="_icon-button_bh2qc_17"
5252
role="button"
5353
style="--cpd-icon-button-size: 32px;"
@@ -73,7 +73,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
7373
<button
7474
aria-disabled="true"
7575
aria-label="There's no one here to call"
76-
aria-labelledby=":r159:"
76+
aria-labelledby=":r16h:"
7777
class="_icon-button_bh2qc_17"
7878
role="button"
7979
style="--cpd-icon-button-size: 32px;"
@@ -98,7 +98,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
9898
</button>
9999
<button
100100
aria-label="Room info"
101-
aria-labelledby=":r15e:"
101+
aria-labelledby=":r16m:"
102102
class="_icon-button_bh2qc_17"
103103
role="button"
104104
style="--cpd-icon-button-size: 32px;"
@@ -123,7 +123,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
123123
</button>
124124
<button
125125
aria-label="Threads"
126-
aria-labelledby=":r15j:"
126+
aria-labelledby=":r16r:"
127127
class="_icon-button_bh2qc_17"
128128
role="button"
129129
style="--cpd-icon-button-size: 32px;"

0 commit comments

Comments
 (0)