Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility contrast fixes #1467

Merged
merged 2 commits into from
Apr 27, 2020
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
40 changes: 37 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"i18next-xhr-backend": "^3.2.2",
"internal-nav-helper": "^3.1.0",
"ip": "^1.1.5",
"ipfs-css": "^0.13.1",
"ipfs-css": "^1.0.0",
"ipfs-geoip": "^4.0.0",
"ipfs-redux-bundle": "^7.0.0",
"ipld-explorer-components": "^1.5.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/Button.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import './Button.css'

const Button = ({ bg = 'bg-aqua', color = 'white', fill = 'white', className = '', disabled, danger, minWidth = 140, children, style, ...props }) => {
const Button = ({ bg = 'bg-teal', color = 'white', fill = 'white', className = '', disabled, danger, minWidth = 140, children, style, ...props }) => {
const bgClass = danger ? 'bg-red' : disabled ? 'bg-gray-muted' : bg
const fillClass = danger ? 'fill-white' : disabled ? 'fill-snow' : fill
const colorClass = danger ? 'white' : disabled ? 'light-gray' : color
Expand Down
2 changes: 1 addition & 1 deletion src/components/connected/Connected.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect } from 'redux-bundler-react'
import { withTranslation } from 'react-i18next'

const pickColor = (ipfsReady, ipfsConnected) => {
if (ipfsReady && ipfsConnected) return 'aqua'
if (ipfsReady && ipfsConnected) return 'teal'
if (ipfsReady) return 'yellow'
return 'gray'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const LanguageModal = ({ t, tReady, onLeave, link, className, ...props }) => {
return (
<Modal {...props} className={className} onCancel={onLeave} style={{ maxWidth: '40em' }}>
<ModalBody icon={SpeakerIcon}>
<p className='gray w-80 center'>{t('languageModal.description')}</p>
<p className='charcoal w-80 center'>{t('languageModal.description')}</p>
<div className='pa2 flex flex-wrap'>
{ localesList.map((lang) =>
<button
key={`lang-${lang}`}
className='pa2 w-33 flex nowrap bg-transparent bn outline-0 aqua pointer'
className='pa2 w-33 flex nowrap bg-transparent bn outline-0 teal pointer'
onClick={() => handleClick(lang)}>
{ getLanguage(lang) }
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/text-input-modal/TextInputModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class TextInputModal extends React.Component {

<ModalActions>
<Button className='ma2' bg='bg-gray' onClick={onCancel}>Cancel</Button>
<Button className='ma2' bg='bg-aqua' disabled={this.isDisabled} onClick={this.onSubmit}>{submitText}</Button>
<Button className='ma2' bg='bg-teal' disabled={this.isDisabled} onClick={this.onSubmit}>{submitText}</Button>
</ModalActions>
</Modal>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/tour/TourHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const TourHelper = ({ doEnableTours, className = '', size = 23 }) => {

return (
<span className={`dib mr1 ml4-m pointer ${className}`} onClick={handleClick}>
<svg className='fill-aqua o-60 glow' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' width={size} height={size}>
<svg className='fill-teal o-60 glow' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' width={size} height={size}>
<path d='m22,0c-12.2,0-22,9.8-22,22s9.8,22 22,22 22-9.8 22-22-9.8-22-22-22zm2,34c0,0.6-0.4,1-1,1h-2c-0.6,0-1-0.4-1-1v-2c0-0.6 0.4-1 1-1h2c0.6,0 1,0.4 1,1v2zm2.7-8.9c-1.4,1.2-2.4,2-2.7,3.1-0.1,0.5-0.5,0.8-1,0.8h-2c-0.6,0-1.1-0.5-1-1.1 0.4-2.9 2.5-4.5 4.2-5.9 1.8-1.4 2.8-2.3 2.8-4 0-2.8-2.2-5-5-5s-5,2.2-5,5c0,0.2 0,0.4 0,0.6 0.1,0.5-0.2,1-0.7,1.1l-1.9,.6c-0.6,0.2-1.2-0.2-1.3-0.8-0.1-0.5-0.1-1-0.1-1.5 0-5 4-9 9-9s9,4 9,9c0,3.7-2.4,5.6-4.3,7.1z' />
</svg>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/files/explore-form/FilesExploreForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class FilesExploreForm extends React.Component {
style={{ borderRadius: '0' }}
title={t('exploreForm.browse')}
onClick={this.onBrowse}
className='ExploreFormButton button-reset pv1 ph2 ba f7 fw4 white bg-aqua overflow-hidden' >
className='ExploreFormButton button-reset pv1 ph2 ba f7 fw4 white bg-gray overflow-hidden' >
<StrokeFolder style={{ height: 24 }} className='dib fill-current-color v-mid' />
<span className='ml2'>{t('exploreForm.browse')}</span>
</Button>
Expand Down
14 changes: 7 additions & 7 deletions src/lib/tours.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const statusTour = {
styles: {
options: {
width: '500px',
primaryColor: '#69c4cd',
primaryColor: '#378085',
textColor: '#34373f',
zIndex: 999
}
Expand All @@ -89,7 +89,7 @@ export const filesTour = {
<h2 className='f3 fw4'>{t('tour.step1.title')}</h2>
<Trans i18nKey='tour.step1.paragraph1'>
<p className='tl f6'>
This is where the files on your <a className='aqua link' href='https://docs.ipfs.io/guides/concepts/mfs/' rel='noopener noreferrer' target='_blank'>
This is where the files on your <a className='teal link' href='https://docs.ipfs.io/guides/concepts/mfs/' rel='noopener noreferrer' target='_blank'>
Mutable File System (MFS)</a> live. You can add files or folders and manage them from this page.
</p>
</Trans>
Expand All @@ -113,7 +113,7 @@ export const filesTour = {
<p className='tl f6'>{t('tour.step3.paragraph2')}</p>
<Trans i18nKey='tour.step3.paragraph3'>
<p className='tl f6'>
If you want to add something that is already on IPFS, you can import it to your MFS by passing its <a className='aqua link' href='https://docs.ipfs.io/guides/concepts/cid/' rel='noopener noreferrer' target='_blank'>Content
If you want to add something that is already on IPFS, you can import it to your MFS by passing its <a className='teal link' href='https://docs.ipfs.io/guides/concepts/cid/' rel='noopener noreferrer' target='_blank'>Content
Identifier (CID)</a>.
</p>
</Trans>
Expand All @@ -136,7 +136,7 @@ export const filesTour = {
styles: {
options: {
width: '500px',
primaryColor: '#69c4cd',
primaryColor: '#378085',
textColor: '#34373f',
zIndex: 999
}
Expand Down Expand Up @@ -175,7 +175,7 @@ export const peersTour = {
styles: {
options: {
width: '500px',
primaryColor: '#69c4cd',
primaryColor: '#378085',
textColor: '#34373f',
zIndex: 999
}
Expand All @@ -198,7 +198,7 @@ export const settingsTour = {
<h2 className='f3 fw4'>{t('tour.step2.title')}</h2>
<Trans i18nKey='tour.step2.paragraph1'>
<p className='tl f6'>You can change the language of the Web UI.
If your preferred language isn't available, head over our project page in <a className='aqua link' href='https://www.transifex.com/ipfs/ipfs-webui/translate/' rel='noopener noreferrer' target='_blank'>Transifex</a> to help us translate!
If your preferred language isn't available, head over our project page in <a className='teal link' href='https://www.transifex.com/ipfs/ipfs-webui/translate/' rel='noopener noreferrer' target='_blank'>Transifex</a> to help us translate!
</p>
</Trans>
</div>,
Expand Down Expand Up @@ -228,7 +228,7 @@ export const settingsTour = {
styles: {
options: {
width: '500px',
primaryColor: '#69c4cd',
primaryColor: '#378085',
textColor: '#34373f',
zIndex: 999
}
Expand Down
2 changes: 1 addition & 1 deletion src/peers/PeersTable/PeersTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class PeersTable extends React.Component {
{({ width }) => (
<Table
className='tl fw4 w-100 f6'
headerClassName='aqua fw2 ttu tracked ph2'
headerClassName='teal fw2 ttu tracked ph2'
rowClassName={this.rowClassRenderer}
width={width}
height={tableHeight}
Expand Down
2 changes: 1 addition & 1 deletion src/settings/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const SettingsPage = ({
)

const SaveButton = ({ t, hasErrors, hasSaveFailed, hasSaveSucceded, isSaving, hasLocalChanges, hasExternalChanges, onClick }) => {
const bg = hasSaveSucceded ? 'bg-green' : 'bg-aqua'
const bg = hasSaveSucceded ? 'bg-green' : 'bg-teal'
return (
<Button
minWidth={100}
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Title.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'

export default ({ props, children }) => (
<h2 className='ttu tracked f6 fw4 aqua mt0 mb3' {...props}>{ children }</h2>
<h2 className='ttu tracked f6 fw4 teal mt0 mb3' {...props}>{ children }</h2>
)
2 changes: 1 addition & 1 deletion src/status/Commons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'

export const Title = ({ children, ...props }) => (
<h2 className='ttu tracked f6 fw4 aqua mt0 mb4' {...props}>{ children }</h2>
<h2 className='ttu tracked f6 fw4 teal mt0 mb4' {...props}>{ children }</h2>
)