Add aria labels to pass a11y

- update snapshot
This commit is contained in:
Vim USDS 2021-10-28 10:41:01 -07:00
parent 6bd9d202dc
commit 4b4d4eef23
2 changed files with 10 additions and 2 deletions

View file

@ -319,12 +319,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<input
aria-describedby="combobox-messageType-assistive-hint"
aria-expanded="false"
aria-label="Select form type"
aria-labelledby="Select form type"
aria-owns="combobox-messageType-list"
autocapitalize="off"
autocomplete="off"
class="usa-combo-box__input"
data-testid="combo-box-input"
role="combobox"
title="Form Selector"
type="text"
value=""
/>
@ -362,7 +365,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</button>
</span>
<ul
aria-labelledby="message-type-label"
aria-labelledby="Form type options"
class="usa-combo-box__list"
data-testid="combo-box-option-list"
hidden=""

View file

@ -56,9 +56,14 @@ const ContactPage = ({location}: IContactPageProps) => {
<ComboBox
id="messageType"
name="messageType"
inputProps={{
'aria-labelledby': 'Select form type',
'title': 'Form Selector',
'aria-label': 'Select form type',
}}
options={messageTypes}
onChange={(messageType) => onMessageTypeChange(messageType)}
ulProps={{'aria-labelledby': 'message-type-label'}}
ulProps={{'aria-labelledby': 'Form type options'}}
/>
<IQContactForm messageType={messageType} />