@autobusal/common 1.33.4 → 1.33.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,9 @@ import { AutocompleteData } from './types';
9
9
 
10
10
  interface Props {
11
11
  name: 'from' | 'to'
12
+ /* Edited: Claude - 2026-08-15: accessible name for the visible input -
13
+ see the note in RoutesSearch. Optional so existing callers are unchanged. */
14
+ label?: string
12
15
  defaultValue: string
13
16
  data: AutocompleteData[]
14
17
  validation: string
@@ -17,7 +20,7 @@ interface Props {
17
20
  onUpdate: UseFormSetValue<any>
18
21
  }
19
22
 
20
- const Autocomplete = ({ name, defaultValue, data, validation, t, refs, onUpdate }: Props): JSX.Element => {
23
+ const Autocomplete = ({ name, label, defaultValue, data, validation, t, refs, onUpdate }: Props): JSX.Element => {
21
24
  const found = data.filter(item => {
22
25
  return item.value === defaultValue;
23
26
  });
@@ -104,6 +107,7 @@ const Autocomplete = ({ name, defaultValue, data, validation, t, refs, onUpdate
104
107
  <input
105
108
  type="text"
106
109
  name={ `${ name }_slug` }
110
+ aria-label={ label }
107
111
  autoComplete="off"
108
112
  value={ q }
109
113
  onChange={ (event) => onChange(event) }
@@ -9,6 +9,12 @@ import { Container } from './styles';
9
9
  interface Props {
10
10
  type: 'picker' | 'dob' | 'date'
11
11
  name: string
12
+ /* Edited: Claude - 2026-08-15: accessible name for the visible input.
13
+ These controls render a bare <input> with no <label>, no id and no
14
+ aria-*, so every one of them reached a screen reader unnamed - 5 of 5
15
+ on the search form, which is the site's primary conversion path.
16
+ Optional, so existing callers are unaffected. */
17
+ label?: string
12
18
  defaultValue?: string
13
19
  t: TFunction<'general'>
14
20
  validation?: string
@@ -30,7 +36,7 @@ interface Props {
30
36
  onChange?: (value: string) => void
31
37
  }
32
38
 
33
- const Calendar = ({ type, name, defaultValue, t, validation, minDate, refs, onUpdate, onChange }: Props): JSX.Element => {
39
+ const Calendar = ({ type, name, label, defaultValue, t, validation, minDate, refs, onUpdate, onChange }: Props): JSX.Element => {
34
40
  const [ show, setShow ] = useState<boolean>(false);
35
41
 
36
42
  /**
@@ -69,7 +75,7 @@ const Calendar = ({ type, name, defaultValue, t, validation, minDate, refs, onUp
69
75
 
70
76
  return (
71
77
  <Container ref={ ref }>
72
- <input type="text" autoComplete="off" readOnly={ true } value={ prepared } onClick={ () => setShow(true) } />
78
+ <input type="text" aria-label={ label } autoComplete="off" readOnly={ true } value={ prepared } onClick={ () => setShow(true) } />
73
79
 
74
80
  { show && (
75
81
  <Picker
@@ -7,6 +7,12 @@ import { getText } from './utilities';
7
7
  import { Container } from './styles';
8
8
 
9
9
  interface Props {
10
+ /* Edited: Claude - 2026-08-15: accessible name for the visible input.
11
+ These controls render a bare <input> with no <label>, no id and no
12
+ aria-*, so every one of them reached a screen reader unnamed - 5 of 5
13
+ on the search form, which is the site's primary conversion path.
14
+ Optional, so existing callers are unaffected. */
15
+ label?: string
10
16
  defaultAdults: number
11
17
  defaultChildren: number
12
18
  defaultBabies: number
@@ -15,7 +21,7 @@ interface Props {
15
21
  onUpdate: UseFormSetValue<any>
16
22
  }
17
23
 
18
- const Passengers = ({ defaultAdults, defaultChildren, defaultBabies, t, refs, onUpdate }: Props): JSX.Element => {
24
+ const Passengers = ({ label, defaultAdults, defaultChildren, defaultBabies, t, refs, onUpdate }: Props): JSX.Element => {
19
25
  const [ show, setShow ] = useState<boolean>(false);
20
26
  const [ adults, setAdults ] = useState<number>(defaultAdults);
21
27
  const [ children, setChildren ] = useState<number>(defaultChildren);
@@ -54,7 +60,7 @@ const Passengers = ({ defaultAdults, defaultChildren, defaultBabies, t, refs, on
54
60
 
55
61
  return (
56
62
  <Container ref={ ref }>
57
- <input type="text" value={ display } readOnly={ true } onClick={ () => setShow(!show) } />
63
+ <input type="text" aria-label={ label } value={ display } readOnly={ true } onClick={ () => setShow(!show) } />
58
64
 
59
65
  { show &&
60
66
  <Persons
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/common",
3
- "version": "1.33.4",
3
+ "version": "1.33.5",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"