From addd376a65d630d1ca90ffc3dbf244923a5cb4a8 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:50:57 -0500 Subject: [PATCH 01/42] refactor(route-viewer): identify route btns for AT --- i18n/en-US.yml | 1 + lib/components/viewers/RouteRow.js | 99 +++++++++++++++--------------- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/i18n/en-US.yml b/i18n/en-US.yml index aeb3e14b7..eb07890d1 100644 --- a/i18n/en-US.yml +++ b/i18n/en-US.yml @@ -481,6 +481,7 @@ components: modeFilter: Mode Filter noFilteredRoutesFound: No routes match your filter! openPatternViewer: View route details + selected: Route selected shortTitle: View Routes stopsInDirectionOfTravel: "Stops in this direction of travel:" title: Route Viewer diff --git a/lib/components/viewers/RouteRow.js b/lib/components/viewers/RouteRow.js index 41dbd0bd7..bf2b436dd 100644 --- a/lib/components/viewers/RouteRow.js +++ b/lib/components/viewers/RouteRow.js @@ -9,6 +9,7 @@ import { ComponentContext } from '../../util/contexts' import { getFormattedMode } from '../../util/i18n' import { getModeFromRoute } from '../../util/viewer' import { Icon } from '../util/styledIcon' +import InvisibleA11yLabel from '../util/invisible-a11y-label' import OperatorLogo from '../util/operator-logo' import RouteName from './route-name' @@ -17,19 +18,18 @@ export const StyledRouteRow = styled.li` align-items: center; background-color: transparent; display: flex; - gap: 7px; justify-content: space-between; list-style: none; margin: 5px 0; - padding: 5px; + min-height: 50px; position: relative; ` // Route Row Button sits invisible on top of the route name and info. export const RouteRowButton = styled(Button)` - height: 100%; - left: 0; - position: absolute; - top: 0; + align-items: center; + display: flex; + min-height: 50px; + padding: 5px; transition: all ease-out 0.1s; width: 100%; @@ -45,15 +45,6 @@ export const RouteRowButton = styled(Button)` z-index: -4; } - &:active, - &.btn-default:active:focus { - background-color: transparent !important; - } - - &:active:before, - &.btn-default:active:focus:before { - background-color: #eee; - transition: all ease-out 0.1s; } ` @@ -69,11 +60,11 @@ export const ModeIconElement = styled.span` const RouteDetailsContainer = styled.div` align-items: center; - display: grid; - grid-template-columns: repeat(4, auto); + display: flex; gap: 12px; - justify-items: center; margin-left: 5px; + // Make sure route details always leaves enough room for pattern button + max-width: 87%; ` const PatternButton = styled.button` @@ -83,15 +74,16 @@ const PatternButton = styled.button` color: #004f96; height: 40px; margin-right: 8px; - min-width: 40px; - opacity: ${(props) => (props.display ? '80%' : 0)}; - position: relative; + position: absolute; + right: 5px; transition: all ease-out 0.1s; z-index: ${(props) => (props.display ? 2 : -2)}; + width: 40px; svg { - margin-top: -3px; height: 22px !important; + margin-top: -3px; + opacity: ${(props) => (props.display ? '80%' : 0)}; width: 22px !important; } @@ -101,7 +93,7 @@ const PatternButton = styled.button` } &:hover { - background: #eee; + background: #fff; transition: all ease-out 0.1s; } ` @@ -172,42 +164,51 @@ export class RouteRow extends PureComponent { return ( - - - {route.mode && ( - - - - )} - - + > + + {isActive && + intl.formatMessage({ + description: 'Identifies that route is active on map', + id: 'components.RouteViewer.selected' + })} + + + + {route.mode && ( + + + + )} + + + ({routeMapToggleText}) + Date: Thu, 10 Aug 2023 15:47:44 -0400 Subject: [PATCH 02/42] refactor: begin shift from walk reluctance slider to dropdown --- .../form/call-taker/advanced-options.js | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/components/form/call-taker/advanced-options.js b/lib/components/form/call-taker/advanced-options.js index 450c8c67f..dcf81ee32 100644 --- a/lib/components/form/call-taker/advanced-options.js +++ b/lib/components/form/call-taker/advanced-options.js @@ -2,9 +2,13 @@ // FIXME: Remove the following eslint rule exception. /* eslint-disable jsx-a11y/label-has-for */ import * as TripFormClasses from '@opentripplanner/trip-form/lib/styled' +import { + DropdownSelector, + SliderSelector, + SubmodeSelector +} from '@opentripplanner/trip-form' import { FormattedMessage, injectIntl } from 'react-intl' import { hasBike } from '@opentripplanner/core-utils/lib/itinerary' -import { SliderSelector, SubmodeSelector } from '@opentripplanner/trip-form' import isEmpty from 'lodash.isempty' import React, { Component, lazy, Suspense } from 'react' import styled from 'styled-components' @@ -155,9 +159,9 @@ class AdvancedOptions extends Component { }) } - _setWaklTolerance = ({ walkTolerance }) => { + _setWalkTolerance = ({ walkReluctance }) => { this.props.setUrlSearch({ - walkTolerance + walkReluctance }) } @@ -224,17 +228,19 @@ class AdvancedOptions extends Component { justifyContent: 'space-between' }} > - {hasBike(currentModes?.map((m) => m.mode).join(',') || '') ? ( From a721df410c66ddc6bca8b1658d88154e6a2ecaff Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Tue, 15 Aug 2023 10:29:35 -0500 Subject: [PATCH 03/42] feat: reset focus to top on each account step --- lib/components/user/sequential-pane-display.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/components/user/sequential-pane-display.tsx b/lib/components/user/sequential-pane-display.tsx index 1939d67af..adf171e21 100644 --- a/lib/components/user/sequential-pane-display.tsx +++ b/lib/components/user/sequential-pane-display.tsx @@ -50,6 +50,12 @@ class SequentialPaneDisplay extends Component> { routeTo(`${parentPath}/${nextId}`) } + h1Ref = React.createRef() + + _handleFocus = () => { + this.h1Ref?.current?.focus() + } + _handleToNextPane = async (e: MouseEvent