Skip to content

Commit d4378e7

Browse files
committed
fix(ui-select,ui-form-field): fix iOS VoiceOver with Select and SimpleSelect announcing 'readonly' and 'textinput'
Also fix formFieldLayout spacing issue if there are multiple messages and the first one is an empty string Fixes INSTUI-4500
1 parent f06b53d commit d4378e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/ui-select/src/Select/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,15 @@ class Select extends Component<SelectProps> {
697697
// popup buttons rather than comboboxes.
698698
const overrideProps: Partial<TextInputProps> = !isEditable
699699
? {
700-
// Given that Safari with Voiceover does not support proper combobox
701-
// handling, a button role is set as a workaround.
700+
// We need role="combobox" for the 'open list' button shortcut to work
701+
// with desktop screenreaders.
702+
// But desktop Safari with Voiceover does not support proper combobox
703+
// handling, a 'button' role is set as a workaround.
702704
// See https://bugs.webkit.org/show_bug.cgi?id=236881
703-
role: utils.isSafari() ? 'button' : 'combobox',
705+
// Also on iOS Chrome with role='combobox' it announces unnecessarily
706+
// that its 'read-only' and that this is a 'textfield', see INSTUI-4500
707+
role:
708+
utils.isSafari() || utils.isAndroidOrIOS() ? 'button' : 'combobox',
704709
title: inputValue,
705710
'aria-autocomplete': undefined,
706711
'aria-readonly': true

0 commit comments

Comments
 (0)