Skip to content

Commit 4cc23b4

Browse files
fix(a11y): Fix some a11y issues (landing page only, desktop and mobile).
1 parent ae58931 commit 4cc23b4

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

Diff for: lib/components/form/date-time-preview.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class DateTimePreview extends Component {
6565

6666
const button = (
6767
<div className='button-container'>
68-
<Button onClick={this.props.onClick}>
68+
<Button
69+
aria-label='Edit departure or arrival time'
70+
onClick={this.props.onClick}
71+
>
6972
{editButtonText}{caret && <span> <i className={`fa fa-caret-${caret}`} /></span>}
7073
</Button>
7174
</div>

Diff for: lib/components/form/settings-preview.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ class SettingsPreview extends Component {
3535
let showDot = coreUtils.query.isNotDefaultQuery(query, config)
3636
const button = (
3737
<div className='button-container'>
38-
<Button onClick={this.props.onClick}>
38+
<Button
39+
aria-label={messages.label.replace('\n', ' ')}
40+
onClick={this.props.onClick}
41+
>
3942
{editButtonText}{caret && <span> <i className={`fa fa-caret-${caret}`} /></span>}
4043
</Button>
4144
{showDot && <div className='dot' />}

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
"homepage": "https://github.com/opentripplanner/otp-react-redux#readme",
2929
"dependencies": {
3030
"@opentripplanner/base-map": "^1.0.1",
31-
"@opentripplanner/core-utils": "^1.2.1",
31+
"@opentripplanner/core-utils": "^2.1.0",
3232
"@opentripplanner/endpoints-overlay": "^1.0.1",
3333
"@opentripplanner/from-to-location-picker": "^1.0.1",
3434
"@opentripplanner/geocoder": "^1.0.2",
3535
"@opentripplanner/humanize-distance": "^0.0.22",
3636
"@opentripplanner/icons": "^1.0.1",
3737
"@opentripplanner/itinerary-body": "^1.0.2",
38-
"@opentripplanner/location-field": "^1.0.1",
38+
"@opentripplanner/location-field": "^1.0.2",
3939
"@opentripplanner/location-icon": "^1.0.0",
4040
"@opentripplanner/park-and-ride-overlay": "^1.0.1",
4141
"@opentripplanner/printable-itinerary": "^1.0.0",

Diff for: yarn.lock

+19-5
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,20 @@
12751275
prop-types "^15.7.2"
12761276
qs "^6.9.1"
12771277

1278+
"@opentripplanner/core-utils@^2.1.0":
1279+
version "2.1.0"
1280+
resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-2.1.0.tgz#ab7271a2b560168b21b0dd26c78532f24fd031f5"
1281+
integrity sha512-sQ3oiZB7f01kCVuTj5SzqsPe4uchupNbla+onLWH+aO3wH+OLZNuLRZZ/7oFFFnvpcFBakyg4TePPxyyEyJlMA==
1282+
dependencies:
1283+
"@mapbox/polyline" "^1.1.0"
1284+
"@turf/along" "^6.0.1"
1285+
bowser "^2.7.0"
1286+
lodash.isequal "^4.5.0"
1287+
moment "^2.24.0"
1288+
moment-timezone "^0.5.27"
1289+
prop-types "^15.7.2"
1290+
qs "^6.9.1"
1291+
12781292
"@opentripplanner/endpoints-overlay@^1.0.1":
12791293
version "1.0.1"
12801294
resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-1.0.1.tgz#d95f0bbfddc9382b593845799b963340eece2742"
@@ -1332,12 +1346,12 @@
13321346
react-resize-detector "^4.2.1"
13331347
velocity-react "^1.4.3"
13341348

1335-
"@opentripplanner/location-field@^1.0.1":
1336-
version "1.0.1"
1337-
resolved "https://registry.yarnpkg.com/@opentripplanner/location-field/-/location-field-1.0.1.tgz#9db5622208739db06d707bfb5b443291598d803e"
1338-
integrity sha512-V2i1BDQPzQ8OJ1F1JQkH++LNLQzHR3w0nGvIwY31iTEdukDeePSa5raSPFwAXy90uqNtk2Xt6NPRetMII1L//w==
1349+
"@opentripplanner/location-field@^1.0.2":
1350+
version "1.0.2"
1351+
resolved "https://registry.yarnpkg.com/@opentripplanner/location-field/-/location-field-1.0.2.tgz#16daeac83be8f10b157fc8c51f32e2a8eb0a8db8"
1352+
integrity sha512-+YIXXltw6ZuHyvCzbDL97Wfhq+C/FaT2utmWAf1O1g6BGpkF6dHjh8+ZHoH0al/4/t6AyhSVlPMXOEyaj2xERA==
13391353
dependencies:
1340-
"@opentripplanner/core-utils" "^1.2.0"
1354+
"@opentripplanner/core-utils" "^2.1.0"
13411355
"@opentripplanner/geocoder" "^1.0.2"
13421356
"@opentripplanner/humanize-distance" "^0.0.22"
13431357
"@opentripplanner/location-icon" "^1.0.0"

0 commit comments

Comments
 (0)