James Prado 9cac0298a2 Improve accessibility (a11y) (#1267)
* Manage modal focus

* Add isOpen prop to CustomNodeModal

* Remove outline overrides

* Update outline style for inputs

* Fix modal focus management & Cleanup CustomNodeModal

* Add aria-label on modal close button

* Fix modal scroll to top

* Add aria-live property for notifications

* Add aria-busy to Spinner component

* Fix border styles for generatewallet password inputs

* Update token balances inputs

* Remove multiple h1's & Update styles

* Add alt text to all img elements

* Update swap link from bity to shapeshift

* Update aria-labels and alt text

* Only show keystore password input when required

* Revert "Only show keystore password input when required"

This reverts commit 7ec5de52da0982cd3131f365b142f6915638d831.

* address changes requested
2018-03-08 13:28:43 -06:00

71 lines
2.1 KiB
TypeScript

import * as React from 'react';
import NewTabLink from 'components/ui/NewTabLink';
import isMobile from 'utils/isMobile';
import firefoxIcon from 'assets/images/browsers/firefox.svg';
import chromeIcon from 'assets/images/browsers/chrome.svg';
import operaIcon from 'assets/images/browsers/opera.svg';
import './CryptoWarning.scss';
const BROWSERS = [
{
name: 'Firefox',
href: 'https://www.mozilla.org/en-US/firefox/new/',
icon: firefoxIcon
},
{
name: 'Chrome',
href: 'https://www.google.com/chrome/browser/desktop/index.html',
icon: chromeIcon
},
{
name: 'Opera',
href: 'https://www.opera.com/',
icon: operaIcon
}
];
const CryptoWarning: React.SFC<{}> = () => (
<div className="Tab-content-pane">
<div className="CryptoWarning">
<h2 className="CryptoWarning-title">Your Browser Cannot Generate a Wallet</h2>
<p className="CryptoWarning-text">
{isMobile
? `
MyCrypto requires certain features for secure wallet generation
that your browser doesn't offer. You can still securely use the site
otherwise. To generate a wallet, please use your device's default
browser, or switch to a laptop or desktop computer.
`
: `
MyCrypto requires certain features for secure wallet generation
that your browser doesn't offer. You can still securely use the site
otherwise. To generate a wallet, upgrade to one of the following
browsers:
`}
</p>
<div className="CryptoWarning-browsers">
{BROWSERS.map(browser => (
<NewTabLink
key={browser.href}
href={browser.href}
className="CryptoWarning-browsers-browser"
>
<div>
<img
className="CryptoWarning-browsers-browser-icon"
src={browser.icon}
alt={browser.name + ' logo'}
/>
<div className="CryptoWarning-browsers-browser-name">{browser.name}</div>
</div>
</NewTabLink>
))}
</div>
</div>
</div>
);
export default CryptoWarning;