Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 567248d

Browse files
authored
Add aria labels to message search bar to improve accessibility (#10476)
1 parent 15523cd commit 567248d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/views/rooms/SearchBar.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,17 @@ export default class SearchBar extends React.Component<IProps, IState> {
123123
placeholder={_t("Search…")}
124124
onKeyDown={this.onSearchChange}
125125
/>
126-
<AccessibleButton className={searchButtonClasses} onClick={this.onSearch} />
126+
<AccessibleButton
127+
className={searchButtonClasses}
128+
onClick={this.onSearch}
129+
aria-label={_t("Search")}
130+
/>
127131
</div>
128-
<AccessibleButton className="mx_SearchBar_cancel" onClick={this.props.onCancelClick} />
132+
<AccessibleButton
133+
className="mx_SearchBar_cancel"
134+
onClick={this.props.onCancelClick}
135+
aria-label={_t("Cancel")}
136+
/>
129137
</div>
130138
<SearchWarning isRoomEncrypted={this.props.isRoomEncrypted} kind={WarningKind.Search} />
131139
</>

0 commit comments

Comments
 (0)