Skip to content

Commit 4de63a3

Browse files
committed
Improve styles
1 parent 787ce98 commit 4de63a3

File tree

5 files changed

+31
-27
lines changed

5 files changed

+31
-27
lines changed

src/app/conf/2025/components/call-for-proposals.tsx

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function DefinitionListItem({
7070
}
7171
function TopicsTab() {
7272
return (
73-
<>
73+
<div>
7474
<TabHeading className="mt-6">Suggested Topics</TabHeading>
7575
<ul className="list-disc space-y-2 pl-6">
7676
<li>GraphQL Working Group</li>
@@ -104,13 +104,13 @@ function TopicsTab() {
104104
<li>Documentation</li>
105105
</ul>
106106
</ul>
107-
</>
107+
</div>
108108
)
109109
}
110110

111111
function NotesTab() {
112112
return (
113-
<>
113+
<div>
114114
<TabHeading className="mt-6">Important Notes</TabHeading>
115115
<ul className="list-disc space-y-2 pl-6">
116116
<li>
@@ -199,13 +199,13 @@ function NotesTab() {
199199
<a href="mailto:[email protected]">reach out to us</a> and we will
200200
be more than happy to work with you on your proposal.
201201
</p>
202-
</>
202+
</div>
203203
)
204204
}
205205

206206
function TypesTab() {
207207
return (
208-
<>
208+
<div>
209209
<TabHeading className="mt-6">Submission Types</TabHeading>
210210
<ul className="list-disc space-y-2 pl-6">
211211
<li>
@@ -220,13 +220,13 @@ function TypesTab() {
220220
<li>Lightning Talk: Typically 5-10 minutes in length</li>
221221
<li>Workshop: Typically 1-2 hours in length</li>
222222
</ul>
223-
</>
223+
</div>
224224
)
225225
}
226226

227227
function ProcessTab() {
228228
return (
229-
<>
229+
<div>
230230
<TabHeading className="mt-6">The Talk Selection Process</TabHeading>
231231
<p className="mb-4">
232232
The GraphQL Foundation strives to select conference talks based on fair
@@ -287,7 +287,7 @@ function ProcessTab() {
287287
In the instance that you aren't sure about your abstract, reach out to
288288
us and we will be more than happy to work with you on your proposal.
289289
</p>
290-
</>
290+
</div>
291291
)
292292
}
293293

@@ -386,20 +386,7 @@ export function CallForProposals() {
386386
aria-selected={activeTab === tab}
387387
className="gql-focus-visible flex items-center justify-between px-3 py-4 typography-body-lg hover:bg-sec-light focus:outline-none aria-selected:bg-sec-light"
388388
onFocus={() => setActiveTab(tab)}
389-
onKeyDown={event => {
390-
if (event.key === "ArrowLeft") {
391-
const previousElement =
392-
event.currentTarget.previousElementSibling
393-
if (previousElement) {
394-
;(previousElement as HTMLElement).focus()
395-
}
396-
} else if (event.key === "ArrowRight") {
397-
const nextElement = event.currentTarget.nextElementSibling
398-
if (nextElement) {
399-
;(nextElement as HTMLElement).focus()
400-
}
401-
}
402-
}}
389+
onKeyDown={arrowsMoveSideways}
403390
>
404391
{tab.charAt(0).toUpperCase() + tab.slice(1)}
405392
<ArrowDownIcon className="ml-2 size-6 text-sec-darker opacity-0 [[aria-selected=true]>&]:opacity-100" />
@@ -414,3 +401,17 @@ export function CallForProposals() {
414401
</section>
415402
)
416403
}
404+
405+
function arrowsMoveSideways(event: React.KeyboardEvent<HTMLButtonElement>) {
406+
if (event.key === "ArrowLeft") {
407+
const previousElement = event.currentTarget.previousElementSibling
408+
if (previousElement) {
409+
;(previousElement as HTMLElement).focus()
410+
}
411+
} else if (event.key === "ArrowRight") {
412+
const nextElement = event.currentTarget.nextElementSibling
413+
if (nextElement) {
414+
;(nextElement as HTMLElement).focus()
415+
}
416+
}
417+
}

src/app/conf/2025/components/register-section/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function RegisterSection({ className, ...props }: RegisterSectionProps) {
3636
email. If you did not, please contact us for more details:{" "}
3737
<a
3838
href="mailto:[email protected]"
39-
className="text-neu-800 underline hover:no-underline"
39+
className="gql-focus-visible text-neu-800 underline hover:no-underline"
4040
>
4141
4242
</a>
@@ -57,7 +57,7 @@ export function RegisterSection({ className, ...props }: RegisterSectionProps) {
5757
register as a Sponsor. For further questions, please email us:{" "}
5858
<a
5959
href="mailto:[email protected]"
60-
className="text-neu-800 underline hover:no-underline"
60+
className="gql-focus-visible text-neu-800 underline hover:no-underline"
6161
>
6262
6363
</a>

src/app/conf/2025/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const metadata: Metadata = {
2020

2121
export default function Page() {
2222
return (
23-
<main className="antialiased">
23+
<main className="gql-all-anchors-focusable antialiased">
2424
<Hero />
2525
<div className="gql-conf-container text-neu-900">
2626
<RegisterToday className="md:mb-8 md:mt-24" />

src/app/conf/_design-system/button.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export type ButtonProps =
5757

5858
export function Button(props: ButtonProps) {
5959
const className = clsx(
60-
"relative flex items-center justify-center gap-2.5 font-normal text-base/none text-neu-0 bg-neu-900 hover:bg-neu-800 active:bg-neu-700 font-sans h-14 px-8 data-[size=md]:h-12 data-[variant=secondary]:bg-neu-100 data-[variant=secondary]:text-neu-900 data-[variant=secondary]:hover:bg-neu-200/75 data-[variant=secondary]:active:bg-neu-200/90 gql-focus-visible [aria-disabled]:bg-neu-800",
60+
"relative flex items-center justify-center gap-2.5 font-normal text-base/none text-neu-0 bg-neu-900 hover:bg-neu-800 active:bg-neu-700 font-sans h-14 px-8 data-[size=md]:h-12 data-[variant=secondary]:bg-neu-100 data-[variant=secondary]:text-neu-900 data-[variant=secondary]:hover:bg-neu-200/75 data-[variant=secondary]:active:bg-neu-200/90 gql-focus-visible [aria-disabled]:bg-neu-800 aria-disabled:pointer-events-none",
6161
props.className,
6262
)
6363

@@ -66,6 +66,8 @@ export function Button(props: ButtonProps) {
6666
if ("href" in props && typeof props.href === "string") {
6767
const { className: _1, size: _2, disabled, children, ...rest } = props
6868

69+
if (disabled) (rest as { href?: string }).href = undefined
70+
6971
return (
7072
<Anchor
7173
className={className}

src/globals.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ div[id^="headlessui-menu-items"] {
504504
@apply dark:border-neutral-700/80;
505505
}
506506

507-
.gql-focus-visible {
507+
.gql-focus-visible,
508+
.gql-all-anchors-focusable a {
508509
@apply focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-[5px] focus-visible:outline-neu-900;
509510
}
510511

0 commit comments

Comments
 (0)