Skip to content

Commit 8903501

Browse files
Merge pull request #7477 from megha1807/seo-kanvas-clean
SEO: Improve Kanvas section headings and image accessibility (#7157)
2 parents 7ad8b20 + 3eac17c commit 8903501

2 files changed

Lines changed: 97 additions & 72 deletions

File tree

src/sections/Kanvas/Kanvas-design/kanvas-design-hero.js

Lines changed: 78 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,95 +9,108 @@ import { useState } from "react";
99
import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";
1010

1111
const HeroSectionWrapper = styled.div`
12+
display: flex;
13+
flex-direction: row;
14+
background-color: ${(props) => props.theme.grey121212ToWhite};
15+
width: 100%;
16+
justify-content: space-evenly;
17+
align-items: center;
18+
padding: 3% 5% 8%;
19+
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
1220
13-
display: flex;
14-
flex-direction: row;
15-
background-color: ${props => props.theme.grey121212ToWhite};;
16-
width: 100%;
17-
justify-content: space-evenly;
18-
align-items: center;
19-
padding: 3% 5% 8%;
20-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
21+
@media only screen and (max-width: 767px) {
22+
text-align: center;
23+
flex-direction: column-reverse;
24+
}
2125
26+
.hero-text {
27+
display: flex;
28+
flex-direction: column;
29+
flex: 0 0 35%;
30+
margin-top: 5%;
2231
@media only screen and (max-width: 767px) {
23-
text-align: center;
24-
flex-direction: column-reverse;
32+
max-width: 100%;
33+
margin-top: 15%;
2534
}
35+
}
2636
27-
.hero-text {
28-
display: flex;
29-
flex-direction: column;
30-
flex: 0 0 35%;
31-
margin-top: 5%;
32-
@media only screen and (max-width: 767px) {
33-
max-width: 100%;
34-
margin-top: 15%;
35-
}
36-
}
37+
h2 {
38+
padding-bottom: 2%;
39+
}
3740
38-
h2 {
39-
padding-bottom: 2%;
41+
.hero-image {
42+
display: grid;
43+
grid-template-rows: 5rem 5rem;
44+
place-items: center;
45+
margin: 5% 0;
46+
flex: 0 0 50%;
47+
max-width: 60%;
48+
@media only screen and (max-width: 767px) {
49+
max-width: 100%;
4050
}
4151
42-
.hero-image {
43-
display: grid;
44-
grid-template-rows: 5rem 5rem;
45-
place-items: center;
46-
margin: 5% 0;
47-
flex: 0 0 50%;
48-
max-width: 60%;
49-
@media only screen and (max-width: 767px) {
50-
max-width: 100%;
51-
}
52-
53-
.locator {
54-
/* transform: translateY(-5rem); */
55-
transition: 1s;
56-
z-index: 1;
57-
}
58-
.locator-moving {
59-
transform: translateY(5rem);
60-
transition: 1s;
61-
z-index: 1;
62-
}
63-
64-
.map {
65-
opacity: 0;
66-
transition: opacity ease 0.5s;
67-
z-index: 0;
68-
}
69-
.map-visible {
70-
opacity: 1;
71-
transition: opacity 1s ease 0.5s;
72-
}
52+
.locator {
53+
/* transform: translateY(-5rem); */
54+
transition: 1s;
55+
z-index: 1;
56+
}
57+
.locator-moving {
58+
transform: translateY(5rem);
59+
transition: 1s;
60+
z-index: 1;
61+
}
7362
63+
.map {
64+
opacity: 0;
65+
transition: opacity ease 0.5s;
66+
z-index: 0;
67+
}
68+
.map-visible {
69+
opacity: 1;
70+
transition: opacity 1s ease 0.5s;
7471
}
72+
}
7573
`;
7674

77-
7875
const KanvasHeroSection = () => {
7976
const [locatorRef, inView] = useInView({ threshold: 0.8 });
8077
const [imageInView, setimageInView] = useState(false);
81-
if (inView && !imageInView)
82-
setimageInView(true);
83-
else if (imageInView && !inView)
84-
setimageInView(false);
78+
if (inView && !imageInView) setimageInView(true);
79+
else if (imageInView && !inView) setimageInView(false);
8580

8681
const { isDark } = useStyledDarkMode();
8782

8883
return (
89-
<HeroSectionWrapper>
84+
<HeroSectionWrapper id="kanvas-hero" aria-labelledby="kanvas-hero-heading">
9085
<div className="hero-text">
91-
<h2><span>Design your infrastructure</span></h2>
92-
<p>Kanvasis the world’s only visual designer for Kubernetes and cloud native applications. Design, deploy, and manage your Kubernetes-based, cloud native deployments allowing you to speed up infrastructure configuration.</p>
86+
<h1 id="kanvas-hero-heading">
87+
Kanvas Designer: Visual Cloud Native Infrastructure Tool
88+
</h1>
89+
90+
<h2>Design Your Kubernetes &amp; Cloud Native Infrastructure</h2>
91+
92+
<p>Kanvas is a visual designer for Kubernetes and cloud-native applications. It allows developers and platform engineers to design, deploy, and manage Kubernetes-based infrastructure through an intuitive graphical interface, simplifying cloud-native architecture and accelerating configuration. </p>
9393
</div>
9494
<div className="hero-image">
95-
<img className={imageInView ? "locator-moving" : "locator"} src={isDark ? KanvasLocatorDark : KanvasLocatorLight} alt="locator" />
96-
<img className={imageInView ? "map map-visible" : "map"} src={isDark ? KanvasImageBottomDark : KanvasImageBottomLight} alt="integrations" ref={locatorRef} />
95+
<img
96+
title="Kanvas infrastructure locator - visual Kubernetes design tool"
97+
className={imageInView ? "locator-moving" : "locator"}
98+
src={isDark ? KanvasLocatorDark : KanvasLocatorLight}
99+
alt="Kanvas visual infrastructure design locator icon"
100+
fetchPriority="high"
101+
loading="eager"
102+
/>
103+
<img
104+
title="Kanvas cloud native Kubernetes infrastructure visualization"
105+
className={imageInView ? "map map-visible" : "map"}
106+
src={isDark ? KanvasImageBottomDark : KanvasImageBottomLight}
107+
alt="Kanvas infrastructure visualization diagram showing cloud native components"
108+
loading="lazy"
109+
ref={locatorRef}
110+
/>
97111
</div>
98112
</HeroSectionWrapper>
99-
100113
);
101114
};
102115

103-
export default KanvasHeroSection;
116+
export default KanvasHeroSection;

src/sections/Kanvas/Kanvas-design/kanvas-design-integrations.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,40 +112,52 @@ const KanvasIntegrationsSection = () => {
112112
// const { isDark } = useStyledDarkMode();
113113

114114
return (
115-
<IntegrationsSectionWrapper>
115+
<IntegrationsSectionWrapper
116+
id="kanvas-integrations-section"
117+
aria-labelledby="kanvas-integrations"
118+
>
116119
<div
117120
className="hero-image"
118121
ref={diagramRef}
119122
style={{ alignSelf: "center", width: "100%" }}
120123
>
121124
<IntegrationsImage
122-
alt="integrations-img"
125+
role="img"
126+
title="Kanvas cloud native integrations - Kubernetes, service mesh, and infrastructure tools"
127+
alt="Kanvas integrations diagram showing supported cloud native infrastructure tools and platforms"
123128
className={imageInView ? "diagram-visible" : "diagram-hidden"}
124129
/>
125130
</div>
126131
<div className="hero-text">
127132
<div>
128-
<h1>
133+
<h2 id="kanvas-integrations">
129134
{Math.ceil(integrations.allMdx.totalCount / 10) * 10}+ Built-in
130135
Integrations
131-
</h1>
136+
</h2>
132137
</div>
133138
<div>
134-
<img className="underline-img" src={UnderlineImg} alt="" />
139+
<img
140+
className="underline-img"
141+
src={UnderlineImg}
142+
alt="decorative underline graphic highlighting integrations section"
143+
aria-hidden="true"
144+
/>
135145
</div>
136146
<div>
137-
<h4>
147+
<p>
138148
Support for all of your Cloud Native Infrastructure and
139149
Applications.
140-
</h4>
150+
</p>
141151
</div>
142152
<div>
143153
<Button
154+
aria-label="View all Kanvas cloud native integrations"
144155
id="integrations"
145156
$secondary
146157
style={{ margin: "1.5rem 0 1.5rem 0" }}
147158
$url="https://layer5.io/cloud-native-management/meshery/integrations"
148159
$external={true}
160+
rel="noopener noreferrer"
149161
>
150162
All Integrations
151163
</Button>

0 commit comments

Comments
 (0)