Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
2523d966
Commit
2523d966
authored
Apr 10, 2026
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(web): improve navigation accessibility
parent
fee7fcd6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
26 deletions
+28
-26
Navigation.tsx
web/src/components/Navigation.tsx
+28
-26
No files found.
web/src/components/Navigation.tsx
View file @
2523d966
...
@@ -69,9 +69,10 @@ const Navigation = (props: Props) => {
...
@@ -69,9 +69,10 @@ const Navigation = (props: Props) => {
icon
:
<
UserCircleIcon
className=
"w-6 h-auto shrink-0"
/>,
icon
:
<
UserCircleIcon
className=
"w-6 h-auto shrink-0"
/>,
};
};
const
n
avLinks
:
NavLinkItem
[]
=
currentUser
const
primaryN
avLinks
:
NavLinkItem
[]
=
currentUser
?
[
homeNavLink
,
exploreNavLink
,
attachmentsNavLink
,
inboxNavLink
]
?
[
homeNavLink
,
exploreNavLink
,
attachmentsNavLink
,
inboxNavLink
]
:
[
exploreNavLink
,
signInNavLink
];
:
[
exploreNavLink
,
signInNavLink
];
const
inboxAriaLabel
=
unreadCount
>
0
?
`
${
t
(
"common.inbox"
)}
,
${
unreadCount
}
unread`
:
t
(
"common.inbox"
);
return
(
return
(
<
header
className=
{
cn
(
"w-full h-full overflow-auto flex flex-col justify-between items-start gap-4"
,
className
)
}
>
<
header
className=
{
cn
(
"w-full h-full overflow-auto flex flex-col justify-between items-start gap-4"
,
className
)
}
>
...
@@ -79,7 +80,8 @@ const Navigation = (props: Props) => {
...
@@ -79,7 +80,8 @@ const Navigation = (props: Props) => {
<
NavLink
className=
"mb-3 cursor-default"
to=
{
currentUser
?
Routes
.
ROOT
:
Routes
.
EXPLORE
}
>
<
NavLink
className=
"mb-3 cursor-default"
to=
{
currentUser
?
Routes
.
ROOT
:
Routes
.
EXPLORE
}
>
<
MemosLogo
collapsed=
{
collapsed
}
/>
<
MemosLogo
collapsed=
{
collapsed
}
/>
</
NavLink
>
</
NavLink
>
{
navLinks
.
map
((
navLink
)
=>
(
<
TooltipProvider
>
{
primaryNavLinks
.
map
((
navLink
)
=>
(
<
NavLink
<
NavLink
className=
{
({
isActive
})
=>
className=
{
({
isActive
})
=>
cn
(
cn
(
...
@@ -93,10 +95,10 @@ const Navigation = (props: Props) => {
...
@@ -93,10 +95,10 @@ const Navigation = (props: Props) => {
key=
{
navLink
.
id
}
key=
{
navLink
.
id
}
to=
{
navLink
.
path
}
to=
{
navLink
.
path
}
id=
{
navLink
.
id
}
id=
{
navLink
.
id
}
aria
-
label=
{
navLink
.
id
===
"header-inbox"
?
inboxAriaLabel
:
undefined
}
viewTransition
viewTransition
>
>
{
props
.
collapsed
?
(
{
props
.
collapsed
?
(
<
TooltipProvider
>
<
Tooltip
>
<
Tooltip
>
<
TooltipTrigger
asChild
>
<
TooltipTrigger
asChild
>
<
div
>
{
navLink
.
icon
}
</
div
>
<
div
>
{
navLink
.
icon
}
</
div
>
...
@@ -105,13 +107,13 @@ const Navigation = (props: Props) => {
...
@@ -105,13 +107,13 @@ const Navigation = (props: Props) => {
<
p
>
{
navLink
.
title
}
</
p
>
<
p
>
{
navLink
.
title
}
</
p
>
</
TooltipContent
>
</
TooltipContent
>
</
Tooltip
>
</
Tooltip
>
</
TooltipProvider
>
)
:
(
)
:
(
navLink
.
icon
navLink
.
icon
)
}
)
}
{
!
props
.
collapsed
&&
<
span
className=
"ml-3 truncate"
>
{
navLink
.
title
}
</
span
>
}
{
!
props
.
collapsed
&&
<
span
className=
"ml-3 truncate"
>
{
navLink
.
title
}
</
span
>
}
</
NavLink
>
</
NavLink
>
))
}
))
}
</
TooltipProvider
>
</
div
>
</
div
>
{
currentUser
&&
(
{
currentUser
&&
(
<
div
className=
{
cn
(
"w-full flex flex-col justify-end"
,
props
.
collapsed
?
"items-center"
:
"items-start pl-3"
)
}
>
<
div
className=
{
cn
(
"w-full flex flex-col justify-end"
,
props
.
collapsed
?
"items-center"
:
"items-start pl-3"
)
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment