Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/js/components/app-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function AppContent({

return (
<main
id="main"
className="mx-auto flex h-full w-full max-w-7xl flex-1 flex-col gap-4 rounded-xl"
{...props}
>
Expand Down
10 changes: 10 additions & 0 deletions resources/js/components/app-skip-link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function AppSkipLink() {
return (
<a
href="#main"
className="absolute -top-14 left-4 z-[100] rounded-md bg-black px-4 py-2 text-sm font-semibold text-white shadow-lg transition-all duration-300 ease-in-out focus:top-2 focus:outline-2 focus:ring-primary-500 focus:outline-offset-4 dark:bg-primary dark:text-black dark:focus:outline-sidebar-ring motion-reduce:transition-none"
>
Skip to Main Content
</a>
)
}
1 change: 1 addition & 0 deletions resources/js/components/ui/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
return (
<main
id="main"
data-slot="sidebar-inset"
className={cn(
"bg-background relative flex max-w-full min-h-svh flex-1 flex-col",
Expand Down
11 changes: 8 additions & 3 deletions resources/js/layouts/app-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import AppLayoutTemplate from '@/layouts/app/app-sidebar-layout';
import { AppSkipLink } from '@/components/app-skip-link';
import { type BreadcrumbItem } from '@/types';
import { type ReactNode } from 'react';

Expand All @@ -8,7 +9,11 @@ interface AppLayoutProps {
}

export default ({ children, breadcrumbs, ...props }: AppLayoutProps) => (
<AppLayoutTemplate breadcrumbs={breadcrumbs} {...props}>
{children}
</AppLayoutTemplate>
<>
<AppSkipLink />

<AppLayoutTemplate breadcrumbs={breadcrumbs} {...props}>
{children}
</AppLayoutTemplate>
</>
);
2 changes: 1 addition & 1 deletion resources/js/layouts/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function SettingsLayout({ children }: PropsWithChildren) {

<div className="flex flex-col lg:flex-row lg:space-x-12">
<aside className="w-full max-w-xl lg:w-48">
<nav className="flex flex-col space-y-1 space-x-0">
<nav className="flex flex-col space-y-1 space-x-0" aria-label="Settings">
{sidebarNavItems.map((item, index) => (
<Button
key={`${typeof item.href === 'string' ? item.href : item.href.url}-${index}`}
Expand Down
2 changes: 2 additions & 0 deletions resources/js/pages/settings/appearance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export default function Appearance() {
<AppLayout breadcrumbs={breadcrumbs}>
<Head title="Appearance settings" />

<h1 className="sr-only">Appearance Settings</h1>

<SettingsLayout>
<div className="space-y-6">
<HeadingSmall
Expand Down
2 changes: 2 additions & 0 deletions resources/js/pages/settings/password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export default function Password() {
<AppLayout breadcrumbs={breadcrumbs}>
<Head title="Password settings" />

<h1 className="sr-only">Password Settings</h1>

<SettingsLayout>
<div className="space-y-6">
<HeadingSmall
Expand Down
2 changes: 2 additions & 0 deletions resources/js/pages/settings/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export default function Profile({
<AppLayout breadcrumbs={breadcrumbs}>
<Head title="Profile settings" />

<h1 className="sr-only">Profile Settings</h1>

<SettingsLayout>
<div className="space-y-6">
<HeadingSmall
Expand Down
3 changes: 3 additions & 0 deletions resources/js/pages/settings/two-factor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export default function TwoFactor({
return (
<AppLayout breadcrumbs={breadcrumbs}>
<Head title="Two-Factor Authentication" />

<h1 className="sr-only">Two-Factor Authentication Settings</h1>

<SettingsLayout>
<div className="space-y-6">
<HeadingSmall
Expand Down