Open lukewarlow opened 9 months ago
Hey, thanks for submitting this. Vast array of developer use cases, so this is exciting. Main issue I see is lack of multi stakeholder support. Have standards positions been requested from WebKIt and Mozilla? If so, could you please link to them?
Also, Chromestatus URL seems to be private?
Also, Chromestatus URL seems to be private?
Seems like just a mis-pasted URL. Try https://chromestatus.com/feature/5111537299881984
Apologies have corrected that. Will also file standards positions now
Removing "fast track?" as @cynthia had some concerns about a11y. @cynthia could you please elaborate here?
Just to keep Tag in the loop I've filed an intent to ship. https://groups.google.com/a/chromium.org/g/blink-dev/c/qew_ILTXWSY/m/AxHrcWzuAQAJ Obviously if any major concerns arise I'll address where possible before shipping.
So if I understand the proposal correctly, calling showPicker() would show the picker (which presumably would change the accessibility tree, since the picker is expanded now) but not necessarily move the focus. Has this been tested with a screen reader for usability?
Concern is that from a content author perspective the expansion of the picker would imply that the user is able to enumerate the choices (visually), but that assumption may not hold when the user depends on AT.
I have tested on macOS with Voice Over and it seems to behave as I would expect. You can focus the button when you press enter it moves focus to the first item in the select picker selecting an option returns focus to the button you're on. (or Ctrl + Option + Space moves focus to the menu arrow keys correctly navigate and it otherwise works like enter)
I don't have access to other desktop platforms to test but https://select-show-picker.glitch.me/ can be used in Chrome Canary (experimental flag on) to test it.
As for the correct aria markup for the button I am not sure but the same issue would arise with the existing input.showPicker()
. https://github.com/keithamus/invoker-buttons-proposal should help with the declarative aspect of this.
Concern is that from a content author perspective the expansion of the picker would imply that the user is able to enumerate the choices (visually)
Not necessarily, the <select>
element may be scrolled out of the viewport, so a sighted user wouldn't notice either.
Not sure if focusing the control first would preclude this from satisfying any of its use cases, but since input.showPicker()
does not focus the control first either, it would definitely make it inconsistent, which I think is worse.
Actually, it would be good to have a list of use cases for both. The explainer for this does not list any use cases, and neither did the TAG review for input.showPicker()
, which makes it hard to weigh the different tradeoffs.
Based on https://github.com/whatwg/html/issues/9757 the spec may explicitly allow focusing the target element where required but the default would be to not focus the input (or select).
I don't think the select method would add any new confusion beyond that which might exist for the input method.
https://github.com/whatwg/html/issues/7957 includes an example use case for this function.
Hi @lukewarlow. Thank you for your patience.
We feel that consistency is the top priority here: if select.showPicker()
and input.showPicker()
do not behave consistently, this could create worse accessibility issues, not to mention DX.
We note there's ongoing discussion in whatwg/html#9757 as to if the control, or picker, should be focused by default, which perhaps indicates that the behavior of input.showPicker()
can still be changed?
It's important to have a clear idea of the expected use cases. Are there any use cases that require the control/picker to not be focused?
How easy the default behavior is to escape is also a factor. If the picker is focused by default, can authors get the alternate behavior by running input.blur()
? If the picker is not followed by default, can authors get the other behavior by running input.focus()
?
We suggest that you talk with the Accessible Platform Architectures (APA) WG to arrive at some guidance for authors that could be incorporated into the spec as a note.
Looking forward to your response, especially around use cases.
こんにちは TAG-さん!
I'm requesting a TAG review of the
showPicker()
method forHTMLSelectElement
.The
showPicker()
element is a new addition toHTMLSelectElement
which addresses a common request from web developers: programmatically showing the options picker for select controls.showPicker
on HTMLInputElement so most discussion occured for that.Further details:
You should also know that...
https://github.com/w3ctag/design-reviews/issues/688 is the relevant review request for the input element. It was closed as unsatisfied because there's no way to detect if the method does anything. While the spec doesn't mandate this do anything for
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @lukewarlow