Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 081e08c

Browse files
nikolaiberestevich-derivNikolai Berestevich
andauthored
nikolai.berestevich/refactor/delete alt tags for icons /markets 39155 (#1949)
* nikolai.berestevich/fix/delete alt tags for icons /markets 39155 * nikolai.berestevich/fix/delete alt tags for icons /markets 39155 * nikolai.berestevich/fix/delete alt tags for icons /markets 39155 * nikolai.berestevich/refactor/ refactor wrap as a prop _available-platforms.js Co-authored-by: Nikolai Berestevich <[email protected]>
1 parent 780aff0 commit 081e08c

File tree

21 files changed

+72
-150
lines changed

21 files changed

+72
-150
lines changed

src/components/elements/off-canvas-menu.js

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const OffCanvasMenuWrapper = (props) => {
155155
icon={() => (
156156
<img
157157
src={MarginTrading}
158-
alt="MarginTrading"
158+
alt=""
159159
width="32"
160160
height="32"
161161
/>
@@ -173,12 +173,7 @@ export const OffCanvasMenuWrapper = (props) => {
173173
<NavCard
174174
aria_label="Options"
175175
icon={() => (
176-
<img
177-
src={Options}
178-
alt="Options"
179-
width="32"
180-
height="32"
181-
/>
176+
<img src={Options} alt="" width="32" height="32" />
182177
)}
183178
content={
184179
<Localize translate_text="Earn fixed payouts by predicting an asset's price movement." />
@@ -193,12 +188,7 @@ export const OffCanvasMenuWrapper = (props) => {
193188
<NavCard
194189
aria_label="Multipliers"
195190
icon={() => (
196-
<img
197-
src={Multipliers}
198-
alt="Multipliers"
199-
width="32"
200-
height="32"
201-
/>
191+
<img src={Multipliers} alt="" width="32" height="32" />
202192
)}
203193
content={
204194
<Localize translate_text="Combine the upside of margin trading with the simplicity of options." />
@@ -219,7 +209,7 @@ export const OffCanvasMenuWrapper = (props) => {
219209
<Flex mb="2rem">
220210
<NavCard
221211
aria_label="DMT5"
222-
icon={() => <img src={DMT5} alt="DMT5" width="32" height="32" />}
212+
icon={() => <img src={DMT5} alt="" width="32" height="32" />}
223213
content={
224214
<Localize translate_text="Trade on Deriv MetaTrader 5 (DMT5), the all-in-one FX and CFD trading platform." />
225215
}
@@ -232,9 +222,7 @@ export const OffCanvasMenuWrapper = (props) => {
232222
<Flex mb="2rem">
233223
<NavCard
234224
aria_label="Derivx"
235-
icon={() => (
236-
<img src={DerivX} alt="Derivx" width="32" height="32" />
237-
)}
225+
icon={() => <img src={DerivX} alt="" width="32" height="32" />}
238226
content={
239227
<Localize translate_text="Trade FX and CFDs on a customisable, easy-to-use trading platform." />
240228
}
@@ -248,9 +236,7 @@ export const OffCanvasMenuWrapper = (props) => {
248236
<Flex mb="2rem">
249237
<NavCard
250238
aria_label="DTrader"
251-
icon={() => (
252-
<img src={DTrader} alt="DTrader" width="32" height="32" />
253-
)}
239+
icon={() => <img src={DTrader} alt="" width="32" height="32" />}
254240
content={
255241
<Localize translate_text="A whole new trading experience on a powerful yet easy to use platform." />
256242
}
@@ -278,7 +264,7 @@ export const OffCanvasMenuWrapper = (props) => {
278264
<Flex mb="2rem">
279265
<NavCard
280266
aria_label="DBot"
281-
icon={() => <img src={DBot} alt="DBot" width="32" height="32" />}
267+
icon={() => <img src={DBot} alt="" width="32" height="32" />}
282268
content={
283269
<Localize translate_text="Automated trading at your fingertips. No coding needed." />
284270
}
@@ -502,18 +488,13 @@ export const OffCanvasMenuWrapper = (props) => {
502488
</StyledLink>
503489
<StyledLink to="/terms-and-conditions/" onClick={handleArrowClick}>
504490
<div>
505-
<img src={Terms} alt="terms" width="24" height="24" />
491+
<img src={Terms} alt="" width="24" height="24" />
506492
</div>
507493
<span>{localize('Terms and conditions')}</span>
508494
</StyledLink>
509495
<StyledLink to="/responsible/" onClick={handleArrowClick}>
510496
<div>
511-
<img
512-
src={SecureTrading}
513-
alt="secure trading"
514-
width="24"
515-
height="24"
516-
/>
497+
<img src={SecureTrading} alt="" width="24" height="24" />
517498
</div>
518499
<span>{localize('Secure and responsible trading')}</span>
519500
</StyledLink>
@@ -525,18 +506,13 @@ export const OffCanvasMenuWrapper = (props) => {
525506
>
526507
<StyledLink to="/partners/affiliate-ib/" onClick={handleArrowClick}>
527508
<div>
528-
<img src={AffiliateIb} alt="affiliate ib" width="32" height="32" />
509+
<img src={AffiliateIb} alt="" width="32" height="32" />
529510
</div>
530511
<span>{localize('Affiliates and IBs')}</span>
531512
</StyledLink>
532513
<StyledLink to="/partners/payment-agent/" onClick={handleArrowClick}>
533514
<div>
534-
<img
535-
src={PaymentAgent}
536-
alt="payment agent"
537-
width="32"
538-
height="32"
539-
/>
515+
<img src={PaymentAgent} alt="" width="32" height="32" />
540516
</div>
541517
<span>{localize('Payment agents')}</span>
542518
</StyledLink>
@@ -549,7 +525,7 @@ export const OffCanvasMenuWrapper = (props) => {
549525
onClick={handleArrowClick}
550526
>
551527
<div>
552-
<img src={API} alt="API" width="32" height="32" />
528+
<img src={API} alt="" width="32" height="32" />
553529
</div>
554530
<span>{localize('API')}</span>
555531
</StyledLink>
@@ -601,7 +577,7 @@ export const OffCanvasMenuPartner = (props) => {
601577
</StyledLink>
602578
<StyledLink to="/partners/payment-agent/" onClick={handleArrowClick}>
603579
<div>
604-
<img src={PaymentAgent} alt="payment agent" width="32" height="32" />
580+
<img src={PaymentAgent} alt="" width="32" height="32" />
605581
</div>
606582
<span>{localize('Payment agents')}</span>
607583
</StyledLink>
@@ -614,7 +590,7 @@ export const OffCanvasMenuPartner = (props) => {
614590
onClick={handleArrowClick}
615591
>
616592
<div>
617-
<img src={API} alt="API" width="32" height="32" />
593+
<img src={API} alt="" width="32" height="32" />
618594
</div>
619595
<span>{localize('API')}</span>
620596
</StyledLink>

src/components/localization/language-dropdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const Dropdown = ({ default_option, onChange, option_list, is_high_nav }) => {
199199
width="24px"
200200
height="24px"
201201
data={data[default_abbreviation]}
202-
alt={default_option.short_name}
202+
alt=""
203203
/>
204204
<ResponsiveText color="white" ml="0.8rem" weight="bold" mr="0.4rem">
205205
{default_option.short_name}
@@ -227,7 +227,7 @@ const Dropdown = ({ default_option, onChange, option_list, is_high_nav }) => {
227227
width="24px"
228228
height="24px"
229229
data={data[abbreviation]}
230-
alt={option.text}
230+
alt=""
231231
/>
232232
<Text ml="0.8rem" color={current_option ? 'red' : 'black'}>
233233
{option.text}

src/pages/landing/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ const simple_step_content = [
1717
text: (
1818
<Localize translate_text="Open a demo account and start trading for free. Practise with an unlimited amount of virtual funds." />
1919
),
20-
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
20+
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
2121
},
2222
{
2323
header: <Localize translate_text="Trade" />,
2424
text: (
2525
<Localize translate_text="Open a real account, make a deposit, and start trading for real. Trade forex, indices, commodities, and more." />
2626
),
27-
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
27+
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
2828
},
2929
{
3030
header: <Localize translate_text="Withdraw" />,
3131
text: (
3232
<Localize translate_text="Get your funds quickly and easily. We support a variety of withdrawal options." />
3333
),
34-
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
34+
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
3535
},
3636
]
3737
const Home = () => {

src/pages/markets/commodities/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ const simple_step_content_commodities = [
1616
text: (
1717
<Localize translate_text="Open a demo account and practise with an unlimited amount of virtual funds." />
1818
),
19-
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
19+
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
2020
},
2121
{
2222
header: <Localize translate_text="Trade" />,
2323
text: (
2424
<Localize translate_text="Open a real account, make a deposit, and start trading commodities and other markets. " />
2525
),
26-
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
26+
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
2727
},
2828
{
2929
header: <Localize translate_text="Withdraw" />,
3030
text: (
3131
<Localize translate_text="Conveniently withdraw your funds through any of our supported withdrawal methods." />
3232
),
33-
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
33+
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
3434
},
3535
]
3636

src/pages/markets/components/helper/_available-platforms.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ const AvailablePlatforms = ({
6464
derivx,
6565
flex_direction,
6666
tablet_direction,
67-
}) => {
67+
}) => {
6868
const { is_eu_country } = React.useContext(DerivStore)
6969

7070
return (
7171
<Flex
72-
style={{'flexWrap': 'wrap'}}
72+
wrap="wrap"
7373
fd={flex_direction}
7474
mobileL={{ mt: '16px' }}
7575
mt="2.4rem"
@@ -84,39 +84,39 @@ const AvailablePlatforms = ({
8484
{dmt5 && (
8585
<LocalizedLink to="/dmt5/">
8686
<StyledFlex direction="row" ai="center">
87-
<img src={DMT5} alt="dmt5 icon" width="32" height="32" />
87+
<img src={DMT5} alt="" width="32" height="32" />
8888
<Text ml="0.4rem">{localize('Deriv MT5 (DMT5)')}</Text>
8989
</StyledFlex>
9090
</LocalizedLink>
9191
)}
9292
{dtrader && (
9393
<LocalizedLink to="/dtrader/">
9494
<StyledFlex direction="row" ai="center">
95-
<img src={DTrader} alt="dtrader icon" width="32" height="32" />
95+
<img src={DTrader} alt="" width="32" height="32" />
9696
<Text ml="0.4rem">{localize('DTrader')}</Text>
9797
</StyledFlex>
9898
</LocalizedLink>
9999
)}
100100
{dbot && (
101101
<LocalizedLink to="/dbot/">
102102
<StyledFlex direction="row" ai="center">
103-
<img src={DBot} alt="dbot icon" width="32" height="32" />
103+
<img src={DBot} alt="" width="32" height="32" />
104104
<Text ml="0.4rem">{localize('DBot')}</Text>
105105
</StyledFlex>
106106
</LocalizedLink>
107107
)}
108108
{smarttrader && (
109109
<a href={smarttrader_url} target="_blank" rel="noopener noreferrer">
110110
<StyledFlex direction="row" ai="center">
111-
<img src={SmartTrader} alt="smarttrader" width="32" height="32" />
111+
<img src={SmartTrader} alt="" width="32" height="32" />
112112
<Text ml="0.4rem">{localize('SmartTrader')}</Text>
113113
</StyledFlex>
114114
</a>
115115
)}
116116
{derivx && !is_eu_country && (
117117
<LocalizedLink to="/derivx/">
118118
<StyledFlex direction="row" ai="center">
119-
<img src={DerivX} alt="Deriv X" width="32" height="32" />
119+
<img src={DerivX} alt="" width="32" height="32" />
120120
<Text ml="0.4rem">{localize('Deriv X')}</Text>
121121
</StyledFlex>
122122
</LocalizedLink>

src/pages/markets/components/helper/_available-trades.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -167,28 +167,13 @@ const Card = ({ display_name, active_tab, onTabChange, name }) => {
167167
<CardContainer name={name} active_tab={active_tab} onClick={() => onTabChange(name)}>
168168
<Flex height="fit-content" jc="flex-start" ai="center">
169169
{active_tab === 'Margin' && (
170-
<TabIcon
171-
src={MarginIcon}
172-
alt="margin icon"
173-
name={name}
174-
active_tab={active_tab}
175-
/>
170+
<TabIcon src={MarginIcon} alt="" name={name} active_tab={active_tab} />
176171
)}
177172
{active_tab === 'Options' && (
178-
<TabIcon
179-
src={OptionsIcon}
180-
alt="option icon"
181-
name={name}
182-
active_tab={active_tab}
183-
/>
173+
<TabIcon src={OptionsIcon} alt="" name={name} active_tab={active_tab} />
184174
)}
185175
{active_tab === 'Multipliers' && (
186-
<TabIcon
187-
src={MultipliersIcon}
188-
alt="multiplier icon"
189-
name={name}
190-
active_tab={active_tab}
191-
/>
176+
<TabIcon src={MultipliersIcon} alt="" name={name} active_tab={active_tab} />
192177
)}
193178
<CardHeader as="h4" type="sub-section-title" width="auto">
194179
{display_name}

src/pages/markets/components/helper/_markets_accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const MarketsAccordion = ({ renderTitle, renderDetails, custom_index }) => {
5252
<Button onClick={() => setShow(!is_show_detail)}>
5353
<StyledChevron
5454
src={ChevronThick}
55-
alt="chevron"
55+
alt=""
5656
width="16px"
5757
height="16px"
5858
is_show_detail={String(is_show_detail)}

src/pages/markets/components/markets/_commodities.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ const Commodities = ({ simple_step_content }) => {
2525
}
2626
>
2727
{commodities.map((content, index) => (
28-
<div
29-
key={index}
30-
text={content.text}
31-
icon={<img src={content.src} alt={content.alt} />}
32-
/>
28+
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
3329
))}
3430
</WhyTrade>
3531
<AvailableTrades

src/pages/markets/components/markets/_cryptocurrencies.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const Cryptocurrencies = ({ simple_step_content }) => {
2323
const crypto_content = [
2424
{
2525
src: Leverage,
26-
alt: 'leverage',
2726
text: is_eu_country ? (
2827
<Localize translate_text="1:2 leverage" />
2928
) : (
@@ -32,17 +31,14 @@ const Cryptocurrencies = ({ simple_step_content }) => {
3231
},
3332
{
3433
src: TightSpread,
35-
alt: 'tight spreads',
3634
text: <Localize translate_text="Tight spreads" />,
3735
},
3836
{
3937
src: CryptoPairs,
40-
alt: 'advanced charting widgets',
4138
text: <Localize translate_text="17+ crypto pairs" />,
4239
},
4340
{
4441
src: ZeroCommission,
45-
alt: 'deposit and withdrawal',
4642
text: <Localize translate_text="Zero commission" />,
4743
},
4844
]
@@ -56,11 +52,7 @@ const Cryptocurrencies = ({ simple_step_content }) => {
5652
}
5753
>
5854
{crypto_content.map((content, index) => (
59-
<div
60-
key={index}
61-
text={content.text}
62-
icon={<img src={content.src} alt={content.alt} />}
63-
/>
55+
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
6456
))}
6557
</WhyTrade>
6658
<AvailableTrades

src/pages/markets/components/markets/_forex.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ const Forex = ({ simple_step_content }) => {
2525
}
2626
>
2727
{forex_content.map((content, index) => (
28-
<div
29-
key={index}
30-
text={content.text}
31-
icon={<img src={content.src} alt={content.alt} />}
32-
/>
28+
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
3329
))}
3430
</WhyTrade>
3531
<AvailableTrades

src/pages/markets/components/markets/_stock-indices.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ const StockIndices = ({ simple_step_content }) => {
2525
}
2626
>
2727
{stock_content.map((content, index) => (
28-
<div
29-
key={index}
30-
text={content.text}
31-
icon={<img src={content.src} alt={content.alt} />}
32-
/>
28+
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
3329
))}
3430
</WhyTrade>
3531
<AvailableTrades

0 commit comments

Comments
 (0)