Skip to content

Commit fa6c04b

Browse files
committed
chore: move screen reader text
1 parent 6673829 commit fa6c04b

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/client/editor/Editor.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,15 @@ export const Editor: FC<EditorProps> = ({
105105

106106
<DropdownMenuPortal>
107107
<DropdownMenuContent align="start">
108-
{snippets.map(
109-
({ name, label, icon: Icon, snippet }, index) => (
110-
<DropdownMenuItem
111-
key={`${label}-${index}`}
112-
onClick={() => onAddSnippet(name, snippet)}
113-
>
114-
<Icon size={24} />
115-
{label}
116-
</DropdownMenuItem>
117-
),
118-
)}
108+
{snippets.map(({ name, label, icon: Icon, snippet }) => (
109+
<DropdownMenuItem
110+
key={label}
111+
onClick={() => onAddSnippet(name, snippet)}
112+
>
113+
<Icon size={24} />
114+
{label}
115+
</DropdownMenuItem>
116+
))}
119117
</DropdownMenuContent>
120118
</DropdownMenuPortal>
121119
</DropdownMenu>
@@ -141,12 +139,12 @@ export const Editor: FC<EditorProps> = ({
141139
asChild={true}
142140
>
143141
<a href={href} target="_blank" rel="noreferrer">
142+
<ExternalLinkIcon />
143+
{title}
144144
<span className="sr-only">
145145
{" "}
146146
(link opens in new tab)
147147
</span>
148-
<ExternalLinkIcon />
149-
{title}
150148
</a>
151149
</DropdownMenuItem>
152150
);

0 commit comments

Comments
 (0)