feat: add link to file location#13285
Conversation
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
|
Hello @GretaD |
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
| showSuccess(t('mail', '<div><p>Attachment saved to files</p><p><strong><u>Go to Files</u></strong></p></div>'), { | ||
| isHTML: true, | ||
| onClick: () => { | ||
| window.open(fileLocationUrl, '_blank') | ||
| }, | ||
| }) |
There was a problem hiding this comment.
I have the impression that this is problematic for accessibility. Is there any way to display a real anchor element that appears clickable (also for screen readers) and has the native _blank target without a JavaScript handler?
There was a problem hiding this comment.
You're absolutely right the onClick/window.open approach won't be announced as a link by screen readers. It'd be best to use a real anchor tag instead. Let me update.
|
|
||
| showSuccess(t('mail', `Attachment saved to Files | ||
| ${fileLocationUrl}`), { | ||
| showSuccess(t('mail', '<div><p>Attachment saved to files</p><p><strong><u>Go to Files</u></strong></p></div>'), { |
There was a problem hiding this comment.
"Files" has to be capitalized to indicate the app.
There was a problem hiding this comment.
Ohh, I hadn't seen that.
I'm modifying.
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
| dir: saved?.path, | ||
| }) | ||
|
|
||
| showSuccess(t('mail', '<div><p>Attachment saved to Files</p><p><a href="{fileLocationUrl}" target="_blank" rel="noopener noreferrer"><strong><u>Go to Files</u></strong></a></p></div>', { |
There was a problem hiding this comment.
This is a tricky string for translators. I suggest to translate Attachment saved to Files and Go to Files without any HTML and build the HTML with these two translated strings. Don't forget to run them through HTML encoding so any special characters are handled.
…ion toast Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>


Adds a clickable link to the saved file's location in the confirmation shown after saving a message attachment to Files.
Fixes #13166