fix(core-components): Add notice Edit Metadata Link opens in new tab

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2023-05-10 16:24:56 -05:00
parent 667c490cc1
commit b1f13cb38a
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fix accessibility issue with Edit Metadata Link on screen readers missing notice about opening in a new tab.
@@ -188,6 +188,9 @@ export const Link = React.forwardRef<any, LinkProps>(
<MaterialLink
{...(newWindow ? { target: '_blank', rel: 'noopener' } : {})}
{...props}
{...(props['aria-label']
? { 'aria-label': `${props['aria-label']}, Opens in a new window` }
: {})}
ref={ref}
href={to}
onClick={handleClick}