WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Question on Drop-down with MAC VoiceOver

for

From: Mark Magennis
Date: Mar 25, 2022 8:07AM


Either way is okay. From an accessibility perspective it's better to use the native HTML <select> because it will behave the way the user expects in whatever browser you're using. But if it's necessary or preferable for reasons other than accessibility to create a select dropdown using ARIA, then as long as you code logical keyboard interactions that aren't radically different from those of the native element in any browser then users will be at worst mildly surprised or confused at the way it works but should still be able to use the control effectively.

In the ARIA example they're probably putting role="option" on the <li> so it's no longer exposed as an <li> anyway and could just as well be <div role="option"> (notwithstanding graceful degradation but I'm guessing that is no longer an issue ... waits for correction).

Mark