Skip to content

Commit 6010e14

Browse files
authored
Merge pull request #10 from MathuraMG/accessibility
Changes to make the links screen reader compatible
2 parents b4ba44a + 70f5638 commit 6010e14

File tree

6 files changed

+23
-20
lines changed

6 files changed

+23
-20
lines changed

client/components/Nav.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ function Nav(props) {
66
<nav className="nav">
77
<ul className="nav__items-left">
88
<li className="nav__item">
9-
<p
9+
<a
1010
className="nav__new"
1111
onClick={props.createProject}
1212
>
1313
New
14-
</p>
14+
</a>
1515
</li>
1616
<li className="nav__item">
17-
<p
17+
<a
1818
className="nav__save"
1919
onClick={props.saveProject}
2020
>
2121
Save
22-
</p>
22+
</a>
2323
</li>
2424
<li className="nav__item">
2525
<p className="nav__open">

client/modules/IDE/components/Sidebar.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ function Sidebar(props) {
1414
<li
1515
className={itemClass}
1616
key={file.id}
17-
onClick={() => props.setSelectedFile(file.id)}
18-
>{file.name}</li>
17+
>
18+
<a
19+
onClick={() => props.setSelectedFile(file.id)}
20+
>{file.name}</a>
21+
</li>
1922
);
2023
})}
2124
</ul>

client/modules/IDE/components/Toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function Toolbar(props) {
3434
<span
3535
className="toolbar__project-name"
3636
// TODO change this span into an input
37-
onBlur={props.setProjectName.bind(this)} // eslint-disable-line
37+
onBlur={props.setProjectName.bind(this)} // eslint-disable-line
3838
contentEditable
3939
suppressContentEditableWarning
4040
>

client/modules/Sketch/pages/SketchListView.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ class SketchListView extends React.Component {
2020
createProject={this.props.createProject}
2121
saveProject={this.props.saveProject}
2222
/>
23-
<table className="sketches-table">
23+
<table className="sketches-table" summary="table containing all saved projects">
2424
<thead>
25-
<th>Name</th>
26-
<th>Created</th>
27-
<th>Last Updated</th>
25+
<th scope="col">Name</th>
26+
<th scope="col">Created</th>
27+
<th scope="col">Last Updated</th>
2828
</thead>
2929
<tbody>
3030
{this.props.sketches.map(sketch =>
3131
<tr className="sketches-table__row">
32-
<td><Link to={`/projects/${sketch._id}`}>{sketch.name}</Link></td>
32+
<td scope="row"><Link to={`/projects/${sketch._id}`}>{sketch.name}</Link></td>
3333
<td>{moment(sketch.createdAt).format('MMM D, YYYY')}</td>
3434
<td>{moment(sketch.updatedAt).format('MMM D, YYYY')}</td>
3535
</tr>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.sidebar__file-list {
2-
border-top: 1px solid $ide-border-color;
2+
border-top: 1px solid $ide-border-color;
33
}
44

55
.sidebar__file-item {
66
padding: #{8 / $base-font-size}rem #{20 / $base-font-size}rem;
77
color: $light-inactive-text-color;
8+
cursor: pointer;
9+
&--selected {
10+
background-color: $ide-border-color;
11+
}
812
}
9-
10-
.sidebar__file-item--selected {
11-
background-color: $ide-border-color;
12-
}

client/styles/components/_signup.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
justify-content: center;
77
}
88

9-
.signup-form__username-label,
9+
.signup-form__username-label,
1010
.signup-form__email-label,
1111
.signup-form__password-label,
1212
.signup-form__confirm-password-label {
1313
display: none;
1414
}
1515

16-
.signup-form__username-input,
16+
.signup-form__username-input,
1717
.signup-form__email-input,
1818
.signup-form__password-input,
1919
.signup-form__confirm-password-input {
@@ -22,4 +22,4 @@
2222

2323
.signup-form__field {
2424
margin: #{20 / $base-font-size}rem 0;
25-
}
25+
}

0 commit comments

Comments
 (0)