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.

nikolai.berestevich/refactor/delete alt tags for icons /markets 39155 #1949

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 36 additions & 84 deletions src/components/elements/off-canvas-menu.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/components/localization/language-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const Dropdown = ({ default_option, onChange, option_list, is_high_nav }) => {
width="24px"
height="24px"
data={data[default_abbreviation]}
alt={default_option.short_name}
alt=""
/>
<ResponsiveText color="white" ml="0.8rem" weight="bold" mr="0.4rem">
{default_option.short_name}
Expand Down Expand Up @@ -227,7 +227,7 @@ const Dropdown = ({ default_option, onChange, option_list, is_high_nav }) => {
width="24px"
height="24px"
data={data[abbreviation]}
alt={option.text}
alt=""
/>
<Text ml="0.8rem" color={current_option ? 'red' : 'black'}>
{option.text}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/landing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ const simple_step_content = [
text: (
<Localize translate_text="Open a demo account and start trading for free. Practise with an unlimited amount of virtual funds." />
),
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
},
{
header: <Localize translate_text="Trade" />,
text: (
<Localize translate_text="Open a real account, make a deposit, and start trading for real. Trade forex, indices, commodities, and more." />
),
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
},
{
header: <Localize translate_text="Withdraw" />,
text: (
<Localize translate_text="Get your funds quickly and easily. We support a variety of withdrawal options." />
),
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
},
]
const Home = () => {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/markets/commodities/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const simple_step_content_commodities = [
text: (
<Localize translate_text="Open a demo account and practise with an unlimited amount of virtual funds." />
),
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
},
{
header: <Localize translate_text="Trade" />,
text: (
<Localize translate_text="Open a real account, make a deposit, and start trading commodities and other markets. " />
),
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
},
{
header: <Localize translate_text="Withdraw" />,
text: (
<Localize translate_text="Conveniently withdraw your funds through any of our supported withdrawal methods." />
),
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
},
]

Expand Down
14 changes: 7 additions & 7 deletions src/pages/markets/components/helper/_available-platforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ const AvailablePlatforms = ({
derivx,
flex_direction,
tablet_direction,
}) => {
}) => {
const { is_eu_country } = React.useContext(DerivStore)

return (
<Flex
style={{'flexWrap': 'wrap'}}
wrap="wrap"
fd={flex_direction}
mobileL={{ mt: '16px' }}
mt="2.4rem"
Expand All @@ -84,39 +84,39 @@ const AvailablePlatforms = ({
{dmt5 && (
<LocalizedLink to="/dmt5/">
<StyledFlex direction="row" ai="center">
<img src={DMT5} alt="dmt5 icon" width="32" height="32" />
<img src={DMT5} alt="" width="32" height="32" />
<Text ml="0.4rem">{localize('Deriv MT5 (DMT5)')}</Text>
</StyledFlex>
</LocalizedLink>
)}
{dtrader && (
<LocalizedLink to="/dtrader/">
<StyledFlex direction="row" ai="center">
<img src={DTrader} alt="dtrader icon" width="32" height="32" />
<img src={DTrader} alt="" width="32" height="32" />
<Text ml="0.4rem">{localize('DTrader')}</Text>
</StyledFlex>
</LocalizedLink>
)}
{dbot && (
<LocalizedLink to="/dbot/">
<StyledFlex direction="row" ai="center">
<img src={DBot} alt="dbot icon" width="32" height="32" />
<img src={DBot} alt="" width="32" height="32" />
<Text ml="0.4rem">{localize('DBot')}</Text>
</StyledFlex>
</LocalizedLink>
)}
{smarttrader && (
<a href={smarttrader_url} target="_blank" rel="noopener noreferrer">
<StyledFlex direction="row" ai="center">
<img src={SmartTrader} alt="smarttrader" width="32" height="32" />
<img src={SmartTrader} alt="" width="32" height="32" />
<Text ml="0.4rem">{localize('SmartTrader')}</Text>
</StyledFlex>
</a>
)}
{derivx && !is_eu_country && (
<LocalizedLink to="/derivx/">
<StyledFlex direction="row" ai="center">
<img src={DerivX} alt="Deriv X" width="32" height="32" />
<img src={DerivX} alt="" width="32" height="32" />
<Text ml="0.4rem">{localize('Deriv X')}</Text>
</StyledFlex>
</LocalizedLink>
Expand Down
21 changes: 3 additions & 18 deletions src/pages/markets/components/helper/_available-trades.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,28 +167,13 @@ const Card = ({ display_name, active_tab, onTabChange, name }) => {
<CardContainer name={name} active_tab={active_tab} onClick={() => onTabChange(name)}>
<Flex height="fit-content" jc="flex-start" ai="center">
{active_tab === 'Margin' && (
<TabIcon
src={MarginIcon}
alt="margin icon"
name={name}
active_tab={active_tab}
/>
<TabIcon src={MarginIcon} alt="" name={name} active_tab={active_tab} />
)}
{active_tab === 'Options' && (
<TabIcon
src={OptionsIcon}
alt="option icon"
name={name}
active_tab={active_tab}
/>
<TabIcon src={OptionsIcon} alt="" name={name} active_tab={active_tab} />
)}
{active_tab === 'Multipliers' && (
<TabIcon
src={MultipliersIcon}
alt="multiplier icon"
name={name}
active_tab={active_tab}
/>
<TabIcon src={MultipliersIcon} alt="" name={name} active_tab={active_tab} />
)}
<CardHeader as="h4" type="sub-section-title" width="auto">
{display_name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MarketsAccordion = ({ renderTitle, renderDetails, custom_index }) => {
<Button onClick={() => setShow(!is_show_detail)}>
<StyledChevron
src={ChevronThick}
alt="chevron"
alt=""
width="16px"
height="16px"
is_show_detail={String(is_show_detail)}
Expand Down
6 changes: 1 addition & 5 deletions src/pages/markets/components/markets/_commodities.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ const Commodities = ({ simple_step_content }) => {
}
>
{commodities.map((content, index) => (
<div
key={index}
text={content.text}
icon={<img src={content.src} alt={content.alt} />}
/>
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
))}
</WhyTrade>
<AvailableTrades
Expand Down
10 changes: 1 addition & 9 deletions src/pages/markets/components/markets/_cryptocurrencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const Cryptocurrencies = ({ simple_step_content }) => {
const crypto_content = [
{
src: Leverage,
alt: 'leverage',
text: is_eu_country ? (
<Localize translate_text="1:2 leverage" />
) : (
Expand All @@ -32,17 +31,14 @@ const Cryptocurrencies = ({ simple_step_content }) => {
},
{
src: TightSpread,
alt: 'tight spreads',
text: <Localize translate_text="Tight spreads" />,
},
{
src: CryptoPairs,
alt: 'advanced charting widgets',
text: <Localize translate_text="17+ crypto pairs" />,
},
{
src: ZeroCommission,
alt: 'deposit and withdrawal',
text: <Localize translate_text="Zero commission" />,
},
]
Expand All @@ -56,11 +52,7 @@ const Cryptocurrencies = ({ simple_step_content }) => {
}
>
{crypto_content.map((content, index) => (
<div
key={index}
text={content.text}
icon={<img src={content.src} alt={content.alt} />}
/>
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
))}
</WhyTrade>
<AvailableTrades
Expand Down
6 changes: 1 addition & 5 deletions src/pages/markets/components/markets/_forex.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ const Forex = ({ simple_step_content }) => {
}
>
{forex_content.map((content, index) => (
<div
key={index}
text={content.text}
icon={<img src={content.src} alt={content.alt} />}
/>
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
))}
</WhyTrade>
<AvailableTrades
Expand Down
6 changes: 1 addition & 5 deletions src/pages/markets/components/markets/_stock-indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ const StockIndices = ({ simple_step_content }) => {
}
>
{stock_content.map((content, index) => (
<div
key={index}
text={content.text}
icon={<img src={content.src} alt={content.alt} />}
/>
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
))}
</WhyTrade>
<AvailableTrades
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const StockIndices = ({ simple_step_content }) => (
}
>
{synthetic_content.map((content, index) => (
<div
key={index}
text={content.text}
icon={<img src={content.src} alt={content.alt} />}
/>
<div key={index} text={content.text} icon={<img src={content.src} alt="" />} />
))}
</WhyTrade>
<AvailableTrades
Expand Down
14 changes: 7 additions & 7 deletions src/pages/markets/components/sections/_other-markets.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import device from 'themes/device'
const markets_type = {
forex: {
// eslint-disable-next-line react/display-name
icon: () => <img src={Forex} alt="forex" width="64" height="64" />,
icon: () => <img src={Forex} alt="" width="64" height="64" />,
title: <Localize translate_text="Forex" />,
content: (
<Localize translate_text="Forex trading gives you the chance to profit from changes in the relative values of currencies on the forex market." />
Expand All @@ -27,7 +27,7 @@ const markets_type = {
},
Synthetic_Indices: {
// eslint-disable-next-line react/display-name
icon: () => <img src={SyntheticIndices} alt="synthetic" width="64" height="64" />,
icon: () => <img src={SyntheticIndices} alt="" width="64" height="64" />,
title: <Localize translate_text="Synthetic indices" />,
content: (
<Localize translate_text="Synthetic indices trading lets you benefit from correctly predicting the price movements of our proprietary indices that simulate real-world market movements." />
Expand All @@ -37,7 +37,7 @@ const markets_type = {
},
stock_indices: {
// eslint-disable-next-line react/display-name
icon: () => <img src={StockIndices} alt="stock" width="64" height="64" />,
icon: () => <img src={StockIndices} alt="" width="64" height="64" />,
title: <Localize translate_text="Stocks & indices" />,
content: (
<Localize translate_text="Stocks & indices trading allows you to profit from the price movements in a market without buying the underlying assets." />
Expand All @@ -48,7 +48,7 @@ const markets_type = {

commodities: {
// eslint-disable-next-line react/display-name
icon: () => <img src={Commodities} alt="commodities" width="64" height="64" />,
icon: () => <img src={Commodities} alt="" width="64" height="64" />,
title: <Localize translate_text="Commodities" />,
content: (
<Localize translate_text="Commodities trading on Deriv lets you profit from correctly predicting the market movement on precious metals and crude oil." />
Expand All @@ -59,7 +59,7 @@ const markets_type = {

cryptocurrencies: {
// eslint-disable-next-line react/display-name
icon: () => <img src={Cryptocurrencies} alt="cryptocurrencies" width="64" height="64" />,
icon: () => <img src={Cryptocurrencies} alt="" width="64" height="64" />,
title: <Localize translate_text="Cryptocurrencies" />,
content: (
<Localize translate_text="Crypto trading gives you an opportunity to benefit from correctly predicting the price movements of cryptocurrencies without buying them." />
Expand Down Expand Up @@ -161,7 +161,7 @@ const Card = ({ name }) => {
<Text mt="0.8rem">{markets_type[name].content}</Text>
<LearnMore to={markets_type[name].to} visibility={button_visibility}>
<Text mr="1rem">{localize('Learn more')}</Text>
<img src={Arrow} alt="arrow right" />
<img src={Arrow} alt="" />
</LearnMore>
</StyledFlex>
)
Expand All @@ -179,7 +179,7 @@ const MobileCard = ({ name }) => {
<Text size="2rem">{markets_type[name].content}</Text>
<LearnMore to={markets_type[name].to} visibility="true">
<Text>{localize('Learn more')}</Text>
<img src={Arrow} alt="arrow right" />
<img src={Arrow} alt="" />
</LearnMore>
</MobileCardWrapper>
)
Expand Down
6 changes: 3 additions & 3 deletions src/pages/markets/cryptocurrencies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const simple_step_content_cryptocurrencies = [
text: (
<Localize translate_text="Open a demo account and practise with an unlimited amount of virtual funds." />
),
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
},
{
header: <Localize translate_text="Trade" />,
text: (
<Localize translate_text="Open a real account, make a deposit, and start trading commodities and other markets. " />
),
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
},
{
header: <Localize translate_text="Withdraw" />,
text: (
<Localize translate_text="Conveniently withdraw your funds through any of our supported withdrawal methods." />
),
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
},
]

Expand Down
6 changes: 3 additions & 3 deletions src/pages/markets/forex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const simple_step_content_forex = [
text: (
<Localize translate_text="Open a demo account and practise with an unlimited amount of virtual funds." />
),
icon: <img src={PractiseIcon} alt="aim" width="32" height="32" />,
icon: <img src={PractiseIcon} alt="" width="32" height="32" />,
},
{
header: <Localize translate_text="Trade" />,
text: (
<Localize translate_text="Open a real account, make a deposit, and start trading forex and other markets." />
),
icon: <img src={TradeIcon} alt="trade" width="32" height="28" />,
icon: <img src={TradeIcon} alt="" width="32" height="28" />,
},
{
header: <Localize translate_text="Withdraw" />,
text: (
<Localize translate_text="Conveniently withdraw your funds through any of our supported withdrawal methods." />
),
icon: <img src={WithdrawIcon} alt="withdraw" width="32" height="32" />,
icon: <img src={WithdrawIcon} alt="" width="32" height="32" />,
},
]

Expand Down
Loading