Closed
Description
I have read through the documentation and using hint
and there is no option to specify a hint using a enhanceSelectElement
Eg:
accessibleAutocomplete.enhanceSelectElement({defaultValue: '',
selectElement: document.querySelector('#foobar'),
hint: 'Begin searching. Use arrow keys to navigate options. Press Enter to select.' //Doesn't work
});
Using a <label>
with ariaDescribeBy
property will not work as the current functionality seems to prevent screen readers announcing this
<label class="form-label" for="foobar">Foobar</label>
<span class="form-hint" id="hint-instructions">Begin searching. Use arrow keys to navigate options. Press Enter to select.</span>
<select aria-describedby="hint-instructions" aria-label="Select a foobar" class="form-control" id="foobar" name="foobar" role="combobox">
<option value="1">1</option>
</select>
If removing the JS function, then will announce properly as normal but the issue is it needs to use enhanceSelectElement
.
Metadata
Metadata
Assignees
Labels
No labels