mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-13 13:17:53 +02:00
♿️(frontend) align search modal field label with placeholder
Remove redundant aria-label on QuickSearch input, align DocSearchModal labels.
This commit is contained in:
@@ -21,6 +21,7 @@ and this project adheres to
|
||||
- ♿️(frontend) enable blocknote heading ids for toc anchors #2449
|
||||
- ♿️(frontend) focus export modal on format select #2421
|
||||
- ♿️(frontend) configurable legal submenu in HelpMenu, remove Crisp #2416
|
||||
- ♿️(frontend) align search modal field label with placeholder #2384
|
||||
|
||||
## [v5.3.0] - 2026-06-19
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ test.describe('Doc grid move', () => {
|
||||
.getByRole('heading', { name: 'Choose a new parent doc' }),
|
||||
).toBeVisible();
|
||||
|
||||
const input = page.getByRole('combobox', { name: 'Search' });
|
||||
const input = page.getByRole('combobox', { name: 'Search for a doc...' });
|
||||
await input.click();
|
||||
await input.fill(titleDoc2);
|
||||
|
||||
@@ -303,7 +303,7 @@ test.describe('Doc grid move', () => {
|
||||
.getByRole('heading', { name: 'Choose a new parent doc' }),
|
||||
).toBeVisible();
|
||||
|
||||
const input = page.getByRole('combobox', { name: 'Search' });
|
||||
const input = page.getByRole('combobox', { name: 'Search for a doc...' });
|
||||
await input.click();
|
||||
await input.fill(titleDoc2);
|
||||
|
||||
|
||||
@@ -120,9 +120,8 @@ test.describe('Document search', () => {
|
||||
const searchButton = page.getByTestId('search-docs-button');
|
||||
|
||||
await searchButton.click();
|
||||
await page.getByRole('combobox', { name: 'Search documents' }).click();
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Search documents' })
|
||||
.getByRole('combobox', { name: 'Type the name of a document' })
|
||||
.fill('sub page');
|
||||
|
||||
// Expect to find the first and second docs in the results list
|
||||
@@ -144,7 +143,7 @@ test.describe('Document search', () => {
|
||||
);
|
||||
await searchButton.click();
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Search documents' })
|
||||
.getByRole('combobox', { name: 'Type the name of a document' })
|
||||
.fill('sub page');
|
||||
|
||||
// Display only current doc results
|
||||
@@ -210,7 +209,7 @@ test.describe('Document search', () => {
|
||||
|
||||
await otherPage.getByTestId('search-docs-button').click();
|
||||
await otherPage
|
||||
.getByRole('combobox', { name: 'Search documents' })
|
||||
.getByRole('combobox', { name: 'Type the name of a document' })
|
||||
.fill('sub page');
|
||||
|
||||
// Search only in the current doc
|
||||
|
||||
@@ -65,7 +65,6 @@ export const QuickSearch = ({
|
||||
>
|
||||
{showInput && (
|
||||
<QuickSearchInput
|
||||
label={label}
|
||||
withSeparator={hasChildrens(children)}
|
||||
inputValue={inputValue}
|
||||
onFilter={onFilter}
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Box } from '../Box';
|
||||
|
||||
type QuickSearchInputProps = {
|
||||
inputValue?: string;
|
||||
label?: string;
|
||||
onFilter?: (str: string) => void;
|
||||
placeholder?: string;
|
||||
withSeparator?: boolean;
|
||||
@@ -19,7 +18,6 @@ type QuickSearchInputProps = {
|
||||
};
|
||||
export const QuickSearchInput = ({
|
||||
inputValue,
|
||||
label,
|
||||
onFilter,
|
||||
placeholder,
|
||||
children,
|
||||
@@ -62,7 +60,6 @@ export const QuickSearchInput = ({
|
||||
<Command.Input
|
||||
ref={inputRef}
|
||||
autoFocus={true}
|
||||
aria-label={label ?? t('Search')}
|
||||
aria-controls={listId}
|
||||
value={inputValue}
|
||||
placeholder={placeholder ?? t('Search')}
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ const DocSearchModalGlobal = ({
|
||||
$padding={{ bottom: 'base' }}
|
||||
>
|
||||
<QuickSearch
|
||||
label={t('Search documents')}
|
||||
label={t('Type the name of a document')}
|
||||
placeholder={t('Type the name of a document')}
|
||||
loading={loading}
|
||||
onFilter={handleInputSearch}
|
||||
|
||||
@@ -201,6 +201,7 @@ export const DocMoveModal = ({
|
||||
}}
|
||||
>
|
||||
<QuickSearch
|
||||
label={t('Search for a doc...')}
|
||||
placeholder={t('Search for a doc...')}
|
||||
loading={loading}
|
||||
onFilter={handleInputSearch}
|
||||
|
||||
Reference in New Issue
Block a user