Skip to content

Commit 318d934

Browse files
committed
perf directory
1 parent 9d672cf commit 318d934

File tree

18 files changed

+62
-33
lines changed

18 files changed

+62
-33
lines changed

src/components/CCIP/Breadcrumb/Breadcrumb.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
display: flex;
33
gap: var(--space-2x);
44
align-items: center;
5-
color: var(--gray-500);
5+
color: var(--gray-700);
66
flex-wrap: wrap;
77
}
88

99
.ccip-hero__breadcrumb a {
10-
color: var(--gray-500);
10+
color: var(--gray-700);
1111
}
1212

1313
.ccip-hero__breadcrumb a:hover {
14-
color: var(--gray-700);
14+
color: var(--gray-800);
1515
}
1616

1717
.ccip-hero__breadcrumb a:last-child {

src/components/CCIP/Cards/TokenCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const TokenCard = memo(function TokenCard({ id, logo, link, onClick }: TokenCard
1616
<div className="token-card__container">
1717
{/* We cannot use the normal Image/onError syntax as a fallback as the element is server rendered
1818
and the onerror does not seem to work correctly. Using Picture will also not work. */}
19-
<object data={logo} type="image/png">
20-
<img src={fallbackTokenIconUrl} alt="" loading="lazy" />
19+
<object data={logo} type="image/png" aria-label={`${id} token logo`}>
20+
<img src={fallbackTokenIconUrl} alt={`${id} token logo`} loading="lazy" />
2121
</object>
2222
<h3>{id}</h3>
2323
</div>
@@ -28,8 +28,8 @@ const TokenCard = memo(function TokenCard({ id, logo, link, onClick }: TokenCard
2828
if (onClick) {
2929
return (
3030
<div className="token-card__container" onClick={onClick} role="button">
31-
<object data={logo} type="image/png">
32-
<img src={fallbackTokenIconUrl} alt="" loading="lazy" />
31+
<object data={logo} type="image/png" aria-label={`${id} token logo`}>
32+
<img src={fallbackTokenIconUrl} alt={`${id} token logo`} loading="lazy" />
3333
</object>
3434
<h3>{id}</h3>
3535
</div>

src/components/CCIP/ChainHero/ChainHero.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
font-size: 14px;
7878
line-height: 22px;
7979
padding-bottom: var(--space-4x);
80-
color: var(--gray-500);
80+
color: var(--gray-700);
8181
}
8282

8383
.ccip-chain-hero__feeTokens__item {
@@ -121,7 +121,7 @@
121121
.ccip-chain-hero__token-logo__symbol {
122122
font-weight: 500;
123123
font-size: 18px;
124-
color: var(--gray-500);
124+
color: var(--gray-700);
125125
}
126126

127127
.ccip-chain-hero__feeTokens__list {

src/components/CCIP/ChainHero/ChainHero.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,14 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
338338
width="20px"
339339
height="20px"
340340
className="ccip-chain-hero__feeTokens__item__logo"
341+
aria-label={`${token.name} token logo`}
341342
>
342-
<img src={fallbackTokenIconUrl} alt={token.name} width="20px" height="20px" />
343+
<img
344+
src={fallbackTokenIconUrl}
345+
alt={`${token.name} token logo`}
346+
width="20px"
347+
height="20px"
348+
/>
343349
</object>
344350
<div>{token.name}</div>
345351
<Address endLength={4} contractUrl={contractUrl} address={address} />

src/components/CCIP/Drawer/Drawer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ function Drawer() {
6464
>
6565
<div className="drawer__container" ref={drawerContentRef}>
6666
<div className="drawer__close">
67-
<button id="drawer-exit" onClick={handleClose}>
67+
<button id="drawer-exit" onClick={handleClose} aria-label="Close drawer">
6868
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
6969
<path d="M15.1667 1.33331L1.83337 14.6666M1.83337 1.33331L15.1667 14.6666" stroke="white" />
7070
</svg>
7171
</button>
7272
<label htmlFor="drawer-exit">Esc</label>
7373
</div>
7474
<div className="drawer__content">
75-
<button onClick={handleClose} className="drawer__closeMobile">
75+
<button onClick={handleClose} className="drawer__closeMobile" aria-label="Close drawer">
7676
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7777
<path d="M15.1667 1.33331L1.83337 14.6666M1.83337 1.33331L15.1667 14.6666" stroke="#000000" />
7878
</svg>

src/components/CCIP/Drawer/TokenDrawer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ function TokenDrawer({
246246
))
247247
}}
248248
>
249-
<img src={networkDetails?.logo} alt={networkDetails?.name} className="ccip-table__logo" />
249+
<img
250+
src={networkDetails?.logo}
251+
alt={`${networkDetails?.name} blockchain logo`}
252+
className="ccip-table__logo"
253+
/>
250254
{networkDetails?.name}
251255
{tokenPaused && (
252256
<span className="ccip-table__paused-badge" title="Transfers are currently paused">

src/components/CCIP/Search/Search.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@
116116
.ccip-hero__search-results li span {
117117
flex: 1;
118118
text-align: end;
119-
color: var(--gray-500);
119+
color: var(--gray-700);
120120
}
121121

122122
.ccip-hero__search-results__title,
123123
.ccip-hero__search-results__no-result {
124124
display: block;
125125
font-size: 18px;
126126
line-height: 24px;
127-
color: var(--gray-500);
127+
color: var(--gray-700);
128128
padding-left: var(--space-6x);
129129
padding-right: var(--space-6x);
130130
padding-top: var(--space-6x);

src/components/CCIP/Search/Search.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function Search({ chains, tokens, small, environment, lanes }: SearchProps) {
140140
})}
141141
ref={searchRef}
142142
>
143-
<img src="/assets/icons/search.svg" alt="" />
143+
<img src="/assets/icons/search.svg" alt="Search icon" />
144144
<input
145145
type="search"
146146
placeholder="Network/Token/Lane"
@@ -167,7 +167,7 @@ function Search({ chains, tokens, small, environment, lanes }: SearchProps) {
167167
<a href={`/ccip/directory/${environment}/chain/${network.chain}`}>
168168
<img
169169
src={network.logo}
170-
alt=""
170+
alt={`${network.name} blockchain logo`}
171171
loading="lazy"
172172
onError={({ currentTarget }) => {
173173
currentTarget.onerror = null // prevents looping
@@ -196,7 +196,7 @@ function Search({ chains, tokens, small, environment, lanes }: SearchProps) {
196196
<a href={`/ccip/directory/${environment}/token/${token.id}`}>
197197
<img
198198
src={token.logo}
199-
alt=""
199+
alt={`${token.id} token logo`}
200200
loading="lazy"
201201
onError={({ currentTarget }) => {
202202
currentTarget.onerror = null // prevents looping
@@ -242,15 +242,15 @@ function Search({ chains, tokens, small, environment, lanes }: SearchProps) {
242242
<div className="ccip-hero__search-results__lane-images">
243243
<img
244244
src={lane.sourceNetwork.logo}
245-
alt=""
245+
alt={`${lane.sourceNetwork.name} source blockchain logo`}
246246
onError={({ currentTarget }) => {
247247
currentTarget.onerror = null // prevents looping
248248
currentTarget.src = fallbackTokenIconUrl
249249
}}
250250
/>
251251
<img
252252
src={lane.destinationNetwork.logo}
253-
alt=""
253+
alt={`${lane.destinationNetwork.name} destination blockchain logo`}
254254
onError={({ currentTarget }) => {
255255
currentTarget.onerror = null // prevents looping
256256
currentTarget.src = fallbackTokenIconUrl

src/components/CCIP/SeeMore/SeeMore.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
height: 22px;
33
font-size: 14px;
44
line-height: 22px;
5-
color: #2e7bff;
5+
color: var(--blue-700);
66
margin-top: var(--space-6x);
77
}
88
.seeMore__container {

src/components/CCIP/SeeMore/SeeMore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface SeeMoreProps {
66
function SeeMore({ onClick }: SeeMoreProps) {
77
return (
88
<div className="seeMore__container">
9-
<button className="seeMore" onClick={onClick}>
9+
<button className="seeMore" onClick={onClick} aria-label="See more items">
1010
See more
1111
</button>
1212
</div>

0 commit comments

Comments
 (0)