File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
src/components/forms/DateInput Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,16 @@ const checkPrDescription: () => void = () => {
109109
110110const checkCodeChanges : ( ) => void = ( ) => {
111111 // Request changes to package source code to also include changes to tests.
112- const hasCodeChanges = allFiles . some ( ( p ) => ! ! p . match ( / ^ s r c \/ .* \. [ j t ] s x ? / ) )
112+ const hasSourceCodeChanges = allFiles . some (
113+ ( p ) => ! ! p . match ( / ^ s r c \/ .( (? ! \. ( s t o r i e s | t e s t ) \. ) .) * \. [ j t ] s x ? / )
114+ )
113115 const hasTestChanges = allFiles . some (
114116 ( p ) => ! ! p . match ( / ^ s r c \/ .* \. t e s t \. [ j t ] s x ? / )
115117 )
116- if ( hasCodeChanges && ! hasTestChanges ) {
118+ const hasStorybookChanges = allFiles . some (
119+ ( p ) => ! ! p . match ( / ^ s r c \/ .* \. s t o r i e s \. [ j t ] s x ? / )
120+ )
121+ if ( hasSourceCodeChanges && ! hasTestChanges ) {
117122 warn (
118123 'This PR does not include changes to tests, even though it affects source code.'
119124 )
@@ -131,11 +136,7 @@ const checkCodeChanges: () => void = () => {
131136 }
132137
133138 // Require new src/components files to include changes to storybook
134- const hasStorybookChanges = allFiles . some (
135- ( p ) => ! ! p . match ( / ^ s r c \/ .* \. s t o r i e s \. [ j t ] s x ? / )
136- )
137-
138- if ( hasCodeChanges && ! hasStorybookChanges ) {
139+ if ( hasSourceCodeChanges && ! hasStorybookChanges ) {
139140 warn (
140141 'This PR does not include changes to storybook, even though it affects component code.'
141142 )
Original file line number Diff line number Diff line change @@ -63,7 +63,10 @@ export const DateOfBirthExample = (): JSX.Element => (
6363 < DateInputGroup >
6464 < FormGroup className = "usa-form-group--month usa-form-group--select" >
6565 < Label htmlFor = "input-select" > Month</ Label >
66- < Select id = "testDateInput" name = "testDateInput" >
66+ < Select
67+ id = "testDateInput"
68+ name = "testDateInput"
69+ aria-describedby = "dateOfBirthHint" >
6770 < option > - Select -</ option >
6871 < option value = "1" > 01 - January</ option >
6972 < option value = "2" > 02 - February</ option >
@@ -86,6 +89,7 @@ export const DateOfBirthExample = (): JSX.Element => (
8689 unit = "day"
8790 maxLength = { 2 }
8891 minLength = { 2 }
92+ aria-describedby = "dateOfBirthHint"
8993 />
9094 < DateInput
9195 id = "testDateInput"
@@ -94,6 +98,7 @@ export const DateOfBirthExample = (): JSX.Element => (
9498 unit = "year"
9599 maxLength = { 4 }
96100 minLength = { 4 }
101+ aria-describedby = "dateOfBirthHint"
97102 />
98103 </ DateInputGroup >
99104 </ Fieldset >
You can’t perform that action at this time.
0 commit comments