Fix custom dropdowns
Div-based dropdowns are often invisible to assistive technology and the keyboard.
Sort and filter become mouse-only.
Steps
- Try the control with Tab and a screen reader.
- Prefer a native select.
- If you keep a custom widget, set role and name.
Failing example
Sort is a div with no role.
Better example
Sort is a labelled select.
Shopify
Replace Shopify collection sort divs with a select or a button and listbox that has a name.
WooCommerce
Use native selects for WooCommerce variations.
WordPress
Prefer a select in WordPress filters.
Wix
Use Wix dropdown form elements rather than clickable containers.