UNCLASSIFIED

Commit ca370772 authored by Anne Demey's avatar Anne Demey
Browse files

Merge remote-tracking branch 'origin/develop' into feature/form-defaults

parents edfe1528 c6f704e5
...@@ -16,7 +16,7 @@ import { PrimaryButton } from './core'; ...@@ -16,7 +16,7 @@ import { PrimaryButton } from './core';
const korolevFont = 'korolev, Helvetica Neue, Helvetica, Arial, sans-serif'; const korolevFont = 'korolev, Helvetica Neue, Helvetica, Arial, sans-serif';
const ContactForm = ({ onClose, defaultService }) => { const ContactForm = ({ onClose, defaultService, ...rest }) => {
const [name, setName] = useState(''); const [name, setName] = useState('');
const [email, setEmail] = useState(''); const [email, setEmail] = useState('');
const [services, setServices] = useState(''); const [services, setServices] = useState('');
...@@ -51,7 +51,7 @@ const ContactForm = ({ onClose, defaultService }) => { ...@@ -51,7 +51,7 @@ const ContactForm = ({ onClose, defaultService }) => {
}; };
return ( return (
<Box> <Box {...rest}>
<Box <Box
pad="medium" pad="medium"
background="black" background="black"
...@@ -68,7 +68,13 @@ const ContactForm = ({ onClose, defaultService }) => { ...@@ -68,7 +68,13 @@ const ContactForm = ({ onClose, defaultService }) => {
> >
REQUEST A CONSULTATION REQUEST A CONSULTATION
</Heading> </Heading>
{onClose && <Button icon={<Close />} onClick={onClose}></Button>} {onClose && (
<Button
icon={<Close />}
onClick={onClose}
a11yTitle="close this dialog"
></Button>
)}
</Box> </Box>
<Box <Box
pad="medium" pad="medium"
...@@ -95,7 +101,7 @@ const ContactForm = ({ onClose, defaultService }) => { ...@@ -95,7 +101,7 @@ const ContactForm = ({ onClose, defaultService }) => {
</Text>{' '} </Text>{' '}
data. data.
</Text> </Text>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit} aria-live="assertive">
<FormField <FormField
name="entry.1114584563" name="entry.1114584563"
htmlFor="text-input-name" htmlFor="text-input-name"
...@@ -179,7 +185,7 @@ const ContactForm = ({ onClose, defaultService }) => { ...@@ -179,7 +185,7 @@ const ContactForm = ({ onClose, defaultService }) => {
<PrimaryButton <PrimaryButton
pad={{ vertical: 'large' }} pad={{ vertical: 'large' }}
type="submit" type="submit"
a11yTitle="Submit" a11yTitle="Submit this consultation request form"
label="Submit" label="Submit"
style={{ width: onClose ? '250px' : '100%' }} style={{ width: onClose ? '250px' : '100%' }}
/> />
...@@ -215,13 +221,14 @@ const ContactForm = ({ onClose, defaultService }) => { ...@@ -215,13 +221,14 @@ const ContactForm = ({ onClose, defaultService }) => {
style={{ style={{
fontFamily: korolevFont, fontFamily: korolevFont,
}} }}
aria-live="polite"
> >
REQUESTING CONSULTATION REQUESTING CONSULTATION
</Text> </Text>
</Box> </Box>
)} )}
{success && ( {success && (
<Box pad="large" align="center" justify="center"> <Box pad="large" align="center" justify="center" aria-live="polite">
<Heading <Heading
level={3} level={3}
style={{ fontFamily: korolevFont }} style={{ fontFamily: korolevFont }}
......
...@@ -38,7 +38,7 @@ const FeedbackForm = ({ onClose }) => { ...@@ -38,7 +38,7 @@ const FeedbackForm = ({ onClose }) => {
}; };
return ( return (
<Box> <Box role="dialog" aria-modal="true" a11yTitle="Send us your feedback">
<Box <Box
pad="medium" pad="medium"
background="black" background="black"
...@@ -55,12 +55,16 @@ const FeedbackForm = ({ onClose }) => { ...@@ -55,12 +55,16 @@ const FeedbackForm = ({ onClose }) => {
> >
SEND US YOUR FEEDBACK SEND US YOUR FEEDBACK
</Heading> </Heading>
<Button icon={<Close />} onClick={onClose}></Button> <Button
icon={<Close />}
onClick={onClose}
a11yTitle="close this dialog"
></Button>
</Box> </Box>
<Box pad="medium" style={{ position: 'relative', overflowY: 'auto' }}> <Box pad="medium" style={{ position: 'relative', overflowY: 'auto' }}>
{!success && ( {!success && (
<Box> <Box>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit} aria-live="assertive">
<FormField <FormField
name="entry.675672969" name="entry.675672969"
htmlFor="text-input-comments" htmlFor="text-input-comments"
...@@ -136,7 +140,7 @@ const FeedbackForm = ({ onClose }) => { ...@@ -136,7 +140,7 @@ const FeedbackForm = ({ onClose }) => {
<PrimaryButton <PrimaryButton
pad={{ vertical: 'large' }} pad={{ vertical: 'large' }}
type="submit" type="submit"
a11yTitle="Submit" a11yTitle="Submit your feedback"
label="Submit" label="Submit"
style={{ width: '250px' }} style={{ width: '250px' }}
/> />
...@@ -172,13 +176,20 @@ const FeedbackForm = ({ onClose }) => { ...@@ -172,13 +176,20 @@ const FeedbackForm = ({ onClose }) => {
style={{ style={{
fontFamily: korolevFont, fontFamily: korolevFont,
}} }}
aria-live="polite"
> >
SENDING FEEDBACK SENDING FEEDBACK
</Text> </Text>
</Box> </Box>
)} )}
{success && ( {success && (
<Box pad="large" align="center" justify="center" gap="small"> <Box
pad="large"
align="center"
justify="center"
gap="small"
aria-live="polite"
>
<Heading <Heading
level={3} level={3}
style={{ fontFamily: korolevFont }} style={{ fontFamily: korolevFont }}
...@@ -187,7 +198,11 @@ const FeedbackForm = ({ onClose }) => { ...@@ -187,7 +198,11 @@ const FeedbackForm = ({ onClose }) => {
FEEDBACK SENT FEEDBACK SENT
</Heading> </Heading>
<Text textAlign="center">Thanks for sharing with us.</Text> <Text textAlign="center">Thanks for sharing with us.</Text>
<SecondaryButton onClick={onClose} label="Close" /> <SecondaryButton
onClick={onClose}
label="Close"
a11yTitle="Close this dialog"
/>
</Box> </Box>
)} )}
</Box> </Box>
......
...@@ -111,7 +111,12 @@ const Solutions = ({ data }) => { ...@@ -111,7 +111,12 @@ const Solutions = ({ data }) => {
}} }}
> >
<Layer animation="fadeIn"> <Layer animation="fadeIn">
<ContactForm onClose={handleModalToggle} /> <ContactForm
onClose={handleModalToggle}
role="dialog"
aria-modal="true"
a11yTitle="request a consultation"
/>
</Layer> </Layer>
</ThemeContext.Extend> </ThemeContext.Extend>
)} )}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment