UNCLASSIFIED

Commit b0560d1f authored by Kevin Calva's avatar Kevin Calva
Browse files

updated the accessibilty features for the site feedback form and engagement request form

parent e8be170e
...@@ -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 }) => { const ContactForm = ({ onClose, ...rest }) => {
const [submitting, setSubmitting] = useState(); const [submitting, setSubmitting] = useState();
const [success, setSuccess] = useState(); const [success, setSuccess] = useState();
...@@ -37,7 +37,12 @@ const ContactForm = ({ onClose }) => { ...@@ -37,7 +37,12 @@ const ContactForm = ({ onClose }) => {
}; };
return ( return (
<Box> <Box
role={rest.role}
aria-modal={rest.ariaModal}
tabIndex={rest.tabIndex}
a11yTitle={rest.a11yTitle}
>
<Box <Box
pad="medium" pad="medium"
background="black" background="black"
...@@ -54,7 +59,13 @@ const ContactForm = ({ onClose }) => { ...@@ -54,7 +59,13 @@ const ContactForm = ({ onClose }) => {
> >
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"
...@@ -144,7 +155,7 @@ const ContactForm = ({ onClose }) => { ...@@ -144,7 +155,7 @@ const ContactForm = ({ onClose }) => {
<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%' }}
/> />
...@@ -186,7 +197,12 @@ const ContactForm = ({ onClose }) => { ...@@ -186,7 +197,12 @@ const ContactForm = ({ onClose }) => {
</Box> </Box>
)} )}
{success && ( {success && (
<Box pad="large" align="center" justify="center"> <Box
pad="large"
align="center"
justify="center"
aria-live="assertive"
>
<Heading <Heading
level={3} level={3}
style={{ fontFamily: korolevFont }} style={{ fontFamily: korolevFont }}
......
...@@ -62,7 +62,7 @@ const FeedbackFooter = () => { ...@@ -62,7 +62,7 @@ const FeedbackFooter = () => {
}, },
}} }}
> >
<Layer animation="fadeIn"> <Layer animation="fadeIn" aria-hidden="true">
<FeedbackForm onClose={handleToggleOpen} /> <FeedbackForm onClose={handleToggleOpen} />
</Layer> </Layer>
</ThemeContext.Extend> </ThemeContext.Extend>
......
...@@ -38,7 +38,12 @@ const FeedbackForm = ({ onClose }) => { ...@@ -38,7 +38,12 @@ const FeedbackForm = ({ onClose }) => {
}; };
return ( return (
<Box> <Box
role="dialog"
aria-modal="true"
tabIndex={0}
a11yTitle="Send us your feedback"
>
<Box <Box
pad="medium" pad="medium"
background="black" background="black"
...@@ -55,7 +60,11 @@ const FeedbackForm = ({ onClose }) => { ...@@ -55,7 +60,11 @@ 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' }}> <Box pad="medium" style={{ position: 'relative' }}>
{!success && ( {!success && (
...@@ -136,7 +145,7 @@ const FeedbackForm = ({ onClose }) => { ...@@ -136,7 +145,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' }}
/> />
...@@ -178,7 +187,13 @@ const FeedbackForm = ({ onClose }) => { ...@@ -178,7 +187,13 @@ const FeedbackForm = ({ onClose }) => {
</Box> </Box>
)} )}
{success && ( {success && (
<Box pad="large" align="center" justify="center" gap="small"> <Box
pad="large"
align="center"
justify="center"
gap="small"
aria-live="assertive"
>
<Heading <Heading
level={3} level={3}
style={{ fontFamily: korolevFont }} style={{ fontFamily: korolevFont }}
...@@ -187,7 +202,11 @@ const FeedbackForm = ({ onClose }) => { ...@@ -187,7 +202,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>
......
...@@ -110,8 +110,14 @@ const Solutions = ({ data }) => { ...@@ -110,8 +110,14 @@ const Solutions = ({ data }) => {
}, },
}} }}
> >
<Layer animation="fadeIn"> <Layer animation="fadeIn" aria-hidden="true">
<ContactForm onClose={handleModalToggle} /> <ContactForm
onClose={handleModalToggle}
role="dialog"
ariaModal="true"
tabIndex={0}
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