Skip to content

Commit 082adcc

Browse files
committed
fix: assistive text, search button focus, mol item height
1 parent 3d8aa0d commit 082adcc

15 files changed

+11
-1
lines changed
27 Bytes
Loading
3.87 KB
Loading
10.9 KB
Loading
-14 Bytes
Loading
1.67 KB
Loading
9.82 KB
Loading

packages/react/src/components/dropdownComponents/modularOptionList/ModularOptionList.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
display: flex;
8989
flex-grow: 1;
9090
justify-content: space-between;
91+
min-height: 24px;
9192

9293
> span.selected {
9394
color: var(--computed-menu-item-icon-color-selected);

packages/react/src/components/dropdownComponents/search/Search.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ const SearchField = forwardRef<SearchInputHandle, SearchFieldProps>(
114114
searchInputLabel: `${containerId}-search-input-label`,
115115
clearButton: `${containerId}-clear-button`,
116116
label: `${containerId}-label`,
117+
assistiveText: `${containerId}-assistive-text`,
117118
},
118119
textProvider: createTextProvider(texts),
119120
getOptionId: (option: Option) => {

packages/react/src/components/dropdownComponents/search/__snapshots__/Search.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exports[`<Search /> spec renders the component 1`] = `
1818
class="inputWrapper"
1919
>
2020
<input
21+
aria-describedby="hds-search-1-assistive-text"
2122
aria-label="Hae"
2223
class="input hasClearButton"
2324
id="hds-search-1-search-input"

packages/react/src/components/dropdownComponents/search/components/AssistiveText.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ import {
1313

1414
function createAssistiveTextProps(dataHandlers: SearchDataHandlers): DivElementProps & { children: string | null } {
1515
const assistive = getTextFromDataHandlers('assistive', dataHandlers);
16+
const { getMetaData } = useSearchDataHandlers();
17+
const { elementIds } = getMetaData();
1618
return {
1719
className: styles.assistiveText,
1820
children: assistive || null,
21+
id: elementIds.assistiveText,
1922
};
2023
}
2124

0 commit comments

Comments
 (0)