Skip to content

Commit d703812

Browse files
tryzniakmontogeek
authored andcommitted
fix(accessibility) Improve accessibility of the site (#2274)
- increase contrast of text elements - make ui more screen readable
1 parent 3251a3b commit d703812

File tree

10 files changed

+24
-20
lines changed

10 files changed

+24
-20
lines changed

src/components/Contributors/Contributors.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default ({contributors}) => {
1414
<a key={ contributor }
1515
className="contributor"
1616
href={ `https://github.com/${contributor}` }>
17-
<img src={ `https://github.com/${contributor}.png?size=90` } />
17+
<img alt={ contributor } src={ `https://github.com/${contributor}.png?size=90` } />
1818
<span className="contributor__name"> {contributor}</span>
1919
</a>
2020
))

src/components/Navigation/Navigation.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ export default class Navigation extends React.Component {
3939

4040
<div className="navigation__search">
4141
<input
42-
type="text"
42+
aria-label="Search documentation"
43+
type="search"
4344
className="navigation__search-input"
4445
placeholder="Search documentation…"
4546
onBlur={ this._toggleSearch.bind(this) } />
4647
<button
48+
aria-label="Open search"
4749
className="navigation__search-icon icon-magnifying-glass"
4850
onClick={ this._toggleSearch.bind(this) } />
4951
<button
52+
aria-label="Close search"
5053
className="navigation__search-icon icon-cross"
5154
onClick={ this._toggleSearch.bind(this) } />
5255
</div>

src/components/NotificationBar/NotificationBar.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default class NotificationBar extends React.Component {
1919
</p>
2020
{ localStorageIsEnabled ?
2121
<button
22+
aria-label="Dismiss"
2223
className="notification-bar__close icon-cross"
2324
onClick={ this._close.bind(this) } /> :
2425
null

src/components/Shield/Shield.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
export default props => (
4-
<img src={
4+
<img alt="webpack shield" src={
55
`https://img.shields.io/${props.content}.svg?label=${props.label}&style=flat-square&maxAge=3600`
66
} />
77
);

src/components/SplashViz/SplashVizSVG.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ module.exports = {
4545
<g transform="translate(342, 225)" stroke="#7E8C94" stroke-width="4">
4646
<path d="M499.558824,86.52 C499.558824,86.52 484.852941,81.02 439.908088,109.436667 C394.963235,137.853333 380.992647,164.436667 380.992647,164.436667" stroke-dasharray="7"></path>
4747
<path d="M499.558824,86.0616667 C499.558824,86.0616667 484.852941,91.5616667 439.908088,63.145 C394.963235,34.7283333 380.992647,8.145 380.992647,8.145" stroke-dasharray="7"></path>
48-
<path d="M0.477941176,170.395 C0.477941176,170.395 169.382939,98.895 447.847936,98.895" id="Shape_99_" stroke-dasharray="6"></path>
49-
<path d="M0.477941176,72.395 C0.477941176,72.395 169.382939,0.895 447.847936,0.895" id="Shape_99_" stroke-dasharray="6" transform="translate(224.162939, 36.645000) scale(1, -1) translate(-224.162939, -36.645000) "></path>
48+
<path d="M0.477941176,170.395 C0.477941176,170.395 169.382939,98.895 447.847936,98.895" stroke-dasharray="6"></path>
49+
<path d="M0.477941176,72.395 C0.477941176,72.395 169.382939,0.895 447.847936,0.895" stroke-dasharray="6" transform="translate(224.162939, 36.645000) scale(1, -1) translate(-224.162939, -36.645000) "></path>
5050
</g>
5151
<text font-family="'Source Sans Pro', sans-serif" font-size="18" font-weight="600" fill="#86A5BA">
5252
<tspan x="24.934" y="562">MODULES WITH DEPENDENCIES</tspan>

src/styles/markdown.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@
9999
}
100100

101101
&.tip {
102-
background-color: #DCF2FD;
103-
color: #618ca0;
102+
background-color: #eaf8ff;
103+
color: #4e7182;
104104
}
105105

106106
&.warning {
107-
background-color: #fbedb7;
108-
color: #8c8466;
107+
background-color: #fdf5d8;
108+
color: #716b53;
109109
}
110110

111111
&.todo {
@@ -260,7 +260,7 @@
260260
margin: 0 2px;
261261
padding: 2px 6px;
262262
white-space: normal;
263-
background-color: transparentize(getColor(fiord), 0.94);
263+
background-color: transparentize(getColor(fiord), 0.95);
264264
border-radius: 3px;
265265
text-shadow: 0 1px 0 transparentize(getColor(white), 0.4);
266266
}

src/styles/partials/_vars.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
$colors: (
22
malibu: #8DD6F9,
3-
denim: #1D78C1,
3+
denim: #175d96,
44
fiord: #465E69,
55
elephant: #2B3A42,
66
white: #ffffff,
77
concrete: #f2f2f2,
88
alto: #dedede,
9-
dusty-grey: #999999,
9+
dusty-grey: #777676,
1010
dove-grey: #666666,
1111
emperor: #535353,
1212
mine-shaft: #333333

src/styles/prism-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pre[class*="lang-"] {
4141
.token.prolog,
4242
.token.doctype,
4343
.token.cdata {
44-
color: #77858c;
44+
color: #93a4ad;
4545
}
4646

4747
.token.punctuation {
@@ -71,7 +71,7 @@ pre[class*="lang-"] {
7171
.token.regex,
7272
.token.attr-value,
7373
.token.important {
74-
color: desaturate(#2dd271, 25%)
74+
color: desaturate(#2dd271, 23%)
7575
}
7676

7777
.token.inserted {

src/utilities/markdown.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ module.exports = function() {
1414
var id = parsed.id;
1515

1616
return (
17-
`<h${level} class="header">` +
18-
`<a class="anchor" href="#${id}" id="${id}"></a>` +
19-
`<span class="text">${text}</span>` +
20-
`<a class="icon-link" href="#${id}"></a>` +
21-
`</h${level}>\n`
17+
`<h${level} class="header">
18+
<a class="anchor" aria-hidden="true" href="#${id}" id="${id}"></a>
19+
<span class="text">${text}</span>
20+
<a aria-label="${text}" class="icon-link" href="#${id}"></a>
21+
</h${level}>\n`
2222
);
2323
};
2424

template.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
55
<title><%= htmlWebpackPlugin.options.context.title %></title>

0 commit comments

Comments
 (0)