RESOLVED FIXED 201458
[iOS] Disabled options in the multi-select picker should not be selectable
https://bugs.webkit.org/show_bug.cgi?id=201458
Summary [iOS] Disabled options in the multi-select picker should not be selectable
Ken Petri
Reported 2019-09-04 07:19:34 PDT
In iOS on an iPhone it is possible to select a disabled option within the picker if the options contain an optgroup. For example, an HTML select with the following code will allow the user to select any disabled option within the list of options: <select> <option>one</option> <option disabled>two</option> <optgroup label="group two"> <option>three</option> <option disabled>four</option> </optgroup> </select> Options "two" and "four," though marked disabled, can be selected and will appear as chosen within the pop-up button when it collapses. VoiceOver does not report the disabled options as dimmed (though they style visually as dimmed). This issue does not affect iPad. Only iPhone's picker manifests the issue.
Attachments
Patch (8.90 KB, patch)
2020-08-26 12:33 PDT, Aditya Keerthi
wenson_hsieh: review+
Patch for landing (8.88 KB, patch)
2020-08-26 12:44 PDT, Aditya Keerthi
no flags
Radar WebKit Bug Importer
Comment 1 2019-09-04 07:19:48 PDT
Aditya Keerthi
Comment 2 2020-08-26 12:33:16 PDT
Wenson Hsieh
Comment 3 2020-08-26 12:37:19 PDT
Comment on attachment 407321 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407321&action=review > Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm:289 > + [[view titleLabel] setTextColor:[UIColor colorWithWhite:0.0 alpha:(item.isGroup) ? GroupOptionTextColorAlpha : DisabledOptionAlpha]]; Nit - I think it's a little cleaner without parentheses around item.isGroup here. > LayoutTests/fast/forms/ios/disabled-options-in-multi-select-picker.html:53 > + if (!selectElement.multiple) { Nit - we usually avoid braces around single-line if statements, even in JavaScript. > LayoutTests/fast/forms/ios/disabled-options-in-multi-select-picker.html:61 > + for (i = 0; i < element.getElementsByTagName("*").length; i++) { (Ditto)
Aditya Keerthi
Comment 4 2020-08-26 12:44:56 PDT
Created attachment 407324 [details] Patch for landing
EWS
Comment 5 2020-08-26 15:03:43 PDT
Committed r266194: <https://trac.webkit.org/changeset/266194> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407324 [details].
Smoley
Comment 6 2020-12-07 12:04:51 PST
*** Bug 219536 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.