File tree 4 files changed +14
-8
lines changed
4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ const LocaleSelector = (props: LocaleSelectorProps): JSX.Element | null => {
21
21
getLanguageOptions ( configLanguages )
22
22
const intl = useIntl ( )
23
23
24
+ const onEnterOrSpace = ( e : KeyboardEvent , action : ( ) => void ) : void => {
25
+ if ( e . key === 'Space' || e . key === 'Enter' ) {
26
+ action ( )
27
+ }
28
+ }
29
+
24
30
// Only render if two or more languages are configured.
25
31
return languageOptions ? (
26
32
< Dropdown
@@ -45,7 +51,8 @@ const LocaleSelector = (props: LocaleSelectorProps): JSX.Element | null => {
45
51
key = { locale }
46
52
lang = { locale }
47
53
onClick = { ( ) => setLocale ( locale ) }
48
- onKeyPress = { ( ) => setLocale ( locale ) }
54
+ // @ts -expect-error TODO: repair this type. Handler is not guaranteed to have 'key'
55
+ onKeyPress = { ( e ) => onEnterOrSpace ( e , ( ) => setLocale ( locale ) ) }
49
56
// We are correct, not eslint: https://w3c.github.io/aria-practices/examples/combobox/combobox-select-only.html
50
57
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
51
58
role = "option"
Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ const ViewSwitcher = ({
63
63
< Button
64
64
aria-controls = "view-switcher"
65
65
bsStyle = "link"
66
- className = { `${ tripPlannerActive && 'active' } ` }
66
+ className = { `${ tripPlannerActive ? 'active' : ' '} ` }
67
67
onClick = { _showTripPlanner }
68
68
>
69
69
< FormattedMessage id = "components.BatchRoutingPanel.shortTitle" />
70
70
</ Button >
71
71
< Button
72
72
aria-controls = "view-switcher"
73
73
bsStyle = "link"
74
- className = { `${ routeViewerActive && 'active' } ` }
74
+ className = { `${ routeViewerActive ? 'active' : ' '} ` }
75
75
onClick = { _showRouteViewer }
76
76
>
77
77
< FormattedMessage id = "components.RouteViewer.shortTitle" />
Original file line number Diff line number Diff line change 20
20
.otp .navbar .mobile-header {
21
21
align-items : center;
22
22
display : flex;
23
- height : 60 px ;
23
+ height : 50 px ;
24
24
justify-content : center;
25
25
left : 50px ;
26
- max-width : 70 % ;
26
+ max-width : 90 % ;
27
27
position : fixed;
28
28
right : 50px ;
29
29
text-align : center;
30
- top : -11px ;
31
30
}
32
31
33
32
.otp .navbar .mobile-header-text {
34
33
color : white;
35
34
display : inline-block;
36
35
font-size : 18px ;
37
- padding-top : 9 px ;
36
+ margin : 0 ;
38
37
}
39
38
40
39
@media (max-width : 768px ) {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const Block = connect(mapStateToProps)(styled.div`
47
47
48
48
span {
49
49
display: ${ ( props ) => ( props . renderRouteNamesAndColors ? 'block' : 'none' ) } ;
50
- margin-top: -3px ;
50
+ align-self: center ;
51
51
}
52
52
53
53
svg {
You can’t perform that action at this time.
0 commit comments