intl-tel-input icon indicating copy to clipboard operation
intl-tel-input copied to clipboard

Web accessibility: missing child role for combobox

Open rachelsquirrel opened this issue 4 years ago • 4 comments

Steps to reproduce

  1. Get the Chrome extension to test web accessibility https://accessibilityinsights.io/en/downloads/
  2. Run the fastpass test on the demo page https://intl-tel-input.com

There's an error for a missing child role: textbox

Screenshot 2021-02-12 at 10 29 49

Expected behaviour

A combobox must contain or own a text input element with role textbox - https://www.w3.org/TR/wai-aria-1.1/#combobox

rachelsquirrel avatar Feb 12 '21 10:02 rachelsquirrel

Thanks for putting this together. You're actually the second person to raise this issue. I responded to the last one here: https://github.com/jackocnr/intl-tel-input/pull/1175#issuecomment-774652866

What do you think?

jackocnr avatar Feb 12 '21 11:02 jackocnr

Thanks for your reply. It seems like there's some conflicting information so I asked on Stack Overflow. The reply I got there confirms some kind of input is required and they suggested instead to use role="listbox". Is there a reason not to use listbox instead?

rachelsquirrel avatar Feb 15 '21 08:02 rachelsquirrel

Thanks for doing that :)

Yes I think this example might work: https://w3c.github.io/aria-practices/examples/listbox/listbox-collapsible.html

What do you think?

If you agree, I'd be open to a pull request to update our aria tags to this arrangement.

jackocnr avatar Feb 15 '21 10:02 jackocnr

Yes, that looks good to me!

rachelsquirrel avatar Feb 15 '21 12:02 rachelsquirrel

Just reviewing some of these old issues. That link I shared now redirects here: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/

And I've reviewed that example and we already implement every single one of those aria tags, so I'll close this now. Thanks.

jackocnr avatar Apr 07 '23 09:04 jackocnr