Skip to content

Commit d6b7f98

Browse files
authored
Merge pull request #683 from datum-cloud/chore/main-landmark
chore: update accessibility
2 parents 7247aa4 + f2a22e1 commit d6b7f98

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

src/components/Footer.astro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const navData = navigation as NavData;
9696
>
9797
<!-- Navigation Sections -->
9898

99-
<div class="footer-nav-container">
99+
<div class="footer-nav-container" role="navigation">
100100
{
101101
navData.footer.map((section) => (
102102
<div class="footer-nav-section">
@@ -110,6 +110,7 @@ const navData = navigation as NavData;
110110
target={item.isExternal ? '_blank' : undefined}
111111
rel={item.isExternal ? 'noopener noreferrer' : undefined}
112112
data-astro-prefetch="hover"
113+
tabindex="0"
113114
>
114115
{item.text.toLowerCase() === 'github' ? (
115116
<>
@@ -134,7 +135,7 @@ const navData = navigation as NavData;
134135
}
135136
</div>
136137
<!-- Social Links Section -->
137-
<div class="footer-actions-section">
138+
<div class="footer-actions-section" role="contentinfo">
138139
<div class="w-full">
139140
<div class="mb-8 flex w-full justify-center space-x-3 md:justify-end-safe">
140141
{
@@ -155,8 +156,8 @@ const navData = navigation as NavData;
155156
<p
156157
class="footer-copyright mb-2 w-full text-center text-nowrap md:text-right [&_a]:inline-block"
157158
>
158-
<a href="/legal/terms/" class="footer-nav-link">Terms of Service</a>,
159-
<a href="/legal/privacy/" class="footer-nav-link">Privacy Policy</a>
159+
<a href="/legal/terms/" class="footer-nav-link" tabindex="0">Terms of Service</a>,
160+
<a href="/legal/privacy/" class="footer-nav-link" tabindex="0">Privacy Policy</a>
160161
</p>
161162
<p class="footer-copyright">
162163
&copy; {new Date().getFullYear()} Datum Technology, Inc.

src/components/Hero.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const {
3131
>
3232
{/* Hero Main Content */}
3333
{(title || description) && (
34-
<div class="hero--main-content-inner">
34+
<div class="hero--main-content-inner" role="banner">
3535
{(iconName && iconName !== '') || (subtitle && subtitle !== '') ? (
3636
<div class="hero--main-content-icon">
3737
{iconName && iconName !== '' && (

src/components/Nav.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const {
2424
class="nav--main fade-in--pure"
2525
data-reveal="fade-in--pure--visible"
2626
data-reveal-immediate="true"
27+
role="navigation"
2728
>
2829
{/* Logo */}
2930

src/components/NavMenu.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function hasActiveChild(sections: NavData['main'][0]['children'], currentPath: s
6262
href={item.href}
6363
class={`nav-menu-link ${isActive ? 'link--active' : ''}`}
6464
data-astro-prefetch="hover"
65+
tabindex="0"
6566
>
6667
<span>{item.text}</span>
6768
{item.children && <Arrow class="nav-dropdown-arrow" />}
@@ -89,6 +90,7 @@ function hasActiveChild(sections: NavData['main'][0]['children'], currentPath: s
8990
href={subItem.href}
9091
class={`nav-dropdown-link ${isSubItemActive ? 'link--active' : ''}`}
9192
data-astro-prefetch="hover"
93+
tabindex="0"
9294
>
9395
{'icon' in subItem && subItem.icon && (
9496
<div class="nav-dropdown-icon">

src/components/home/FirstSection.astro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ if (content.data.images) {
2929
}
3030
---
3131

32-
<section class="bg-glacier-mist-700 section--block section--block--pad overflow-clip">
32+
<section
33+
class="bg-glacier-mist-700 section--block section--block--pad fade-in--pure overflow-clip"
34+
data-reveal="fade-in--pure--visible"
35+
data-reveal-immediate="true"
36+
>
3337
<div class="absolute right-0 bottom-0 z-0 flex w-[663px]">
3438
<Image
3539
src={sceneTree}
@@ -49,9 +53,7 @@ if (content.data.images) {
4953
/>
5054
<!-- Scene Tree Image -->
5155
<div
52-
class="fade-in--pure relative z-10 flex flex-col px-6 pt-8 pb-6 md:px-11 md:pt-11 lg:px-16 lg:pt-16 xl:px-20 xl:pt-20"
53-
data-reveal="fade-in--pure--visible"
54-
data-reveal-delay="100"
56+
class="relative z-10 flex flex-col px-6 pt-8 pb-6 md:px-11 md:pt-11 lg:px-16 lg:pt-16 xl:px-20 xl:pt-20"
5557
>
5658
<div
5759
class="mx-auto mb-10 flex w-full flex-col justify-between gap-9 text-center md:mb-20 md:flex-row md:text-left lg:mb-20 xl:mb-24"

src/components/home/Hero.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const { title = '', description = '', class: className } = Astro.props as HeroPr
1919
class="fade-in--small max-width relative z-40 flex flex-col items-center justify-center gap-7 pt-16 pb-29 text-center md:pt-16 md:pb-44 lg:pt-18 lg:pb-32 xl:gap-9 xl:pt-20 xl:pb-44"
2020
data-reveal="fade-in--small--visible"
2121
data-reveal-immediate="true"
22+
role="banner"
2223
>
2324
<h1
2425
class="datum-text-10xl m-auto max-w-140 text-white"

src/v1/styles/components-nav.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@
5151
@apply transition-transform duration-200 ease-in-out;
5252
}
5353

54-
.nav-dropdown:hover .nav-dropdown-arrow {
54+
.nav-dropdown:hover .nav-dropdown-arrow,
55+
.nav-dropdown:focus-within .nav-dropdown-arrow {
5556
@apply rotate-180;
5657
}
5758

5859
.nav-dropdown-menu {
5960
@apply pointer-events-none invisible absolute top-full left-0 z-90 w-max min-w-[250px] rounded-[var(--radius-lg)] bg-white p-6 opacity-0 transition-all duration-200 ease-in-out;
6061
}
6162

62-
.nav-dropdown:hover .nav-dropdown-menu {
63+
.nav-dropdown:hover .nav-dropdown-menu,
64+
.nav-dropdown:focus-within .nav-dropdown-menu {
6365
@apply pointer-events-auto visible opacity-100;
6466
}
6567

0 commit comments

Comments
 (0)