From 7ce46f3d165529c1cd9149b9213df8cffe321ffa Mon Sep 17 00:00:00 2001 From: pedr Date: Mon, 13 Jan 2025 10:02:18 -0300 Subject: [PATCH 1/5] Search results --- packages/app-desktop/gui/NoteList/NoteList2.tsx | 3 ++- packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-desktop/gui/NoteList/NoteList2.tsx b/packages/app-desktop/gui/NoteList/NoteList2.tsx index 225258ee9e0..078322acd49 100644 --- a/packages/app-desktop/gui/NoteList/NoteList2.tsx +++ b/packages/app-desktop/gui/NoteList/NoteList2.tsx @@ -198,7 +198,7 @@ const NoteList = (props: Props) => { const renderEmptyList = () => { if (props.notes.length) return null; - return
{getEmptyFolderMessage(props.folders, props.selectedFolderId)}
; + return
{getEmptyFolderMessage(props.folders, props.selectedFolderId)}
; }; const renderFiller = (key: string, style: React.CSSProperties) => { @@ -302,6 +302,7 @@ const NoteList = (props: Props) => { onKeyUp={onKeyUp} onDrop={onDrop} onContextMenu={onContainerContextMenu} + id='search-results' > {renderEmptyList()} {renderFiller('top', topFillerStyle)} diff --git a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx index 5ef52400c56..2c5b74c3629 100644 --- a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx +++ b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx @@ -79,6 +79,7 @@ export default function(props: Props) { onKeyDown={props.onKeyDown} spellCheck={false} disabled={props.disabled} + aria-controls='search-results' /> Date: Mon, 13 Jan 2025 10:43:01 -0300 Subject: [PATCH 2/5] make alert announceable by screen reader on resource manager --- packages/app-desktop/gui/ResourceScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-desktop/gui/ResourceScreen.tsx b/packages/app-desktop/gui/ResourceScreen.tsx index ca2af7a9e4f..217ed51c3e2 100644 --- a/packages/app-desktop/gui/ResourceScreen.tsx +++ b/packages/app-desktop/gui/ResourceScreen.tsx @@ -287,9 +287,9 @@ class ResourceScreenComponent extends React.Component { return (
-
{ +

{ _('This is an advanced tool to show the attachments that are linked to your notes. Please be careful when deleting one of them as they cannot be restored afterwards.') - }

+ }

Date: Mon, 13 Jan 2025 15:46:49 -0300 Subject: [PATCH 3/5] Revert "make alert announceable by screen reader on resource manager" This reverts commit d7e57ac5113f4adb3f850f16753b027734e425b9. --- packages/app-desktop/gui/ResourceScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-desktop/gui/ResourceScreen.tsx b/packages/app-desktop/gui/ResourceScreen.tsx index 217ed51c3e2..ca2af7a9e4f 100644 --- a/packages/app-desktop/gui/ResourceScreen.tsx +++ b/packages/app-desktop/gui/ResourceScreen.tsx @@ -287,9 +287,9 @@ class ResourceScreenComponent extends React.Component { return (
-

{ +

{ _('This is an advanced tool to show the attachments that are linked to your notes. Please be careful when deleting one of them as they cannot be restored afterwards.') - }

+ }
Date: Mon, 13 Jan 2025 17:26:22 -0300 Subject: [PATCH 4/5] moving ariaControls to parent so it is not used on plugins screen --- packages/app-desktop/gui/SearchBar/SearchBar.tsx | 1 + packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-desktop/gui/SearchBar/SearchBar.tsx b/packages/app-desktop/gui/SearchBar/SearchBar.tsx index a3b9bc0161e..78dbef46d02 100644 --- a/packages/app-desktop/gui/SearchBar/SearchBar.tsx +++ b/packages/app-desktop/gui/SearchBar/SearchBar.tsx @@ -174,6 +174,7 @@ function SearchBar(props: Props) { onKeyDown={onKeyDown} onSearchButtonClick={onSearchButtonClick} searchStarted={searchStarted} + ariaControls='search-results' /> ); diff --git a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx index 2c5b74c3629..63d248e60f5 100644 --- a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx +++ b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx @@ -51,6 +51,7 @@ interface Props { searchStarted: boolean; placeholder?: string; disabled?: boolean; + ariaControls?: string; } export interface OnChangeEvent { @@ -79,7 +80,7 @@ export default function(props: Props) { onKeyDown={props.onKeyDown} spellCheck={false} disabled={props.disabled} - aria-controls='search-results' + aria-controls={props.ariaControls} /> Date: Mon, 13 Jan 2025 17:39:28 -0300 Subject: [PATCH 5/5] renaming in favour of current pattern --- packages/app-desktop/gui/SearchBar/SearchBar.tsx | 2 +- packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/gui/SearchBar/SearchBar.tsx b/packages/app-desktop/gui/SearchBar/SearchBar.tsx index 78dbef46d02..906cc4c047f 100644 --- a/packages/app-desktop/gui/SearchBar/SearchBar.tsx +++ b/packages/app-desktop/gui/SearchBar/SearchBar.tsx @@ -174,7 +174,7 @@ function SearchBar(props: Props) { onKeyDown={onKeyDown} onSearchButtonClick={onSearchButtonClick} searchStarted={searchStarted} - ariaControls='search-results' + aria-controls='search-results' /> ); diff --git a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx index 63d248e60f5..de9d8567404 100644 --- a/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx +++ b/packages/app-desktop/gui/lib/SearchInput/SearchInput.tsx @@ -51,7 +51,7 @@ interface Props { searchStarted: boolean; placeholder?: string; disabled?: boolean; - ariaControls?: string; + 'aria-controls'?: string; } export interface OnChangeEvent { @@ -80,7 +80,7 @@ export default function(props: Props) { onKeyDown={props.onKeyDown} spellCheck={false} disabled={props.disabled} - aria-controls={props.ariaControls} + aria-controls={props['aria-controls']} />