Skip to content

Commit 114c926

Browse files
authored
UX/A11y tweaks, Next bump (#2510)
1 parent 4fcd1b7 commit 114c926

6 files changed

Lines changed: 81 additions & 39 deletions

File tree

bun.lock

Lines changed: 69 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/styleguide.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ export function A({
133133
);
134134
}
135135

136+
const targetWithFallback = target ?? '_blank';
137+
136138
return (
137139
<span
138140
onPointerEnter={() => setIsHovered(true)}
@@ -143,8 +145,8 @@ export function A({
143145
ref={ref as any}
144146
href={href}
145147
numberOfLines={containerStyle ? 1 : undefined}
146-
target={target ?? '_blank'}
147-
hrefAttrs={{ target: target ?? '_blank' }}
148+
target={targetWithFallback}
149+
rel={targetWithFallback === '_blank' ? 'noopener noreferrer' : undefined}
148150
style={[linkStyles, isHovered && linkHoverStyles, style, isHovered && hoverStyle]}>
149151
{children}
150152
</HtmlElements.A>

components/AddLibrarySelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function AddLibrarySelector() {
1717
<Popover.Root open={open} onOpenChange={state => setOpen(state)}>
1818
<HoverEffect>
1919
<Popover.Trigger asChild>
20-
<View>
20+
<View role="dialog">
2121
<View
2222
role="button"
2323
style={[

components/Tools/GitHubButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { GitHubIcon } from '~/components/Icons';
44
import tw from '~/util/tailwind';
55

66
type Props = {
7+
name: string;
78
href: string;
89
};
910

10-
export default function GitHubButton({ href }: Props) {
11+
export default function GitHubButton({ href, name }: Props) {
1112
return (
1213
<Button
1314
openInNewTab
15+
aria-label={`${name} GitHub`}
1416
href={href}
1517
style={tw`min-h-8 flex-row gap-1.5 bg-primary-dark px-3 text-sm`}>
1618
<GitHubIcon style={tw`text-black`} />

components/Tools/ToolEntry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function ToolEntry({ name, description, githubUrl, buttons }: Pro
2424
<H3 style={tw`mb-1 text-xl`}>{name}</H3>
2525
<P style={tw`mb-3 font-light leading-[23px]`}>{description}</P>
2626
<View style={tw`flex-row flex-wrap gap-3`}>
27-
<GitHubButton href={githubUrl} />
27+
<GitHubButton href={githubUrl} name={name} />
2828
{buttons.map(({ label, href }) => (
2929
<Button
3030
key={label}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"es-toolkit": "^1.47.0",
3939
"expo": "57.0.0-canary-20260526-13e89ca",
4040
"expo-font": "57.0.0-canary-20260526-13e89ca",
41-
"next": "^16.2.7",
41+
"next": "^16.2.9",
4242
"node-emoji": "^2.2.0",
4343
"postcss": "^8.5.15",
4444
"react": "19.2.7",
@@ -53,15 +53,15 @@
5353
"rehype-raw": "^7.0.0",
5454
"remark-emoji": "^5.0.2",
5555
"remark-gfm": "^4.0.1",
56-
"semver": "^7.8.3",
56+
"semver": "^7.8.4",
5757
"swr": "^2.4.1",
5858
"tailwindcss": "^3.4.19",
5959
"twrnc": "^4.16.0",
6060
"use-debounce": "^10.1.1"
6161
},
6262
"devDependencies": {
6363
"@expo/next-adapter": "^6.0.0",
64-
"@next/bundle-analyzer": "^16.2.7",
64+
"@next/bundle-analyzer": "^16.2.9",
6565
"@types/bun": "^1.3.14",
6666
"@types/crypto-js": "^4.2.2",
6767
"@types/react": "^19.2.17",

0 commit comments

Comments
 (0)