Skip to content

Replace Select2 with native selects on the records filter screen. - #2009

Open
shadyvb wants to merge 1 commit into
ticket/XWPENG-57-jetpackfrom
ticket/XWPENG-54-native-selects
Open

Replace Select2 with native selects on the records filter screen.#2009
shadyvb wants to merge 1 commit into
ticket/XWPENG-57-jetpackfrom
ticket/XWPENG-54-native-selects

Conversation

@shadyvb

@shadyvb shadyvb commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fixes XWPENG-54.

The records screen filter bar now uses the native <select> elements the server already renders, with no Select2 initialization. Each control gets a screen-reader label, a visible placeholder option, and a stable ID; screen-option visibility targets the select wrapper instead of Select2 DOM.

The user filter lists every user (all users + super-admins + WP-CLI). Sites with many users see a larger <select> until the Ajax combobox in #2011. The unused user-search nonce field and the admin bundle's select2 dependency are dropped (still enqueued via admin-exclude until #2010). Other Select2 screens are unchanged.

Stacked on #2000.

Test plan

  • Records filter bar uses native selects (no Select2 containers).
  • Each filter has an accessible label and a visible placeholder option.
  • Screen-option toggles still show/hide the matching filter.
  • Filtering by user, connector, context, and action still works.
  • Settings and alert-config Select2 screens are unchanged.

…ENG-54)

The records screen filter bar now uses the native <select> elements the
server already renders, with no Select2 initialization:

- admin.js: drop the Select2 setup (options + AJAX user-search modes);
  screen-option visibility now targets the select wrapper instead of
  the Select2 container DOM.
- List_Table::filter_select(): wrap each control in .stream-filter-control,
  add a screen-reader label, a visible placeholder option, and select IDs.
- The user filter lists every user (all users + super-admins + WP-CLI,
  previous option source); the preload cap returns with the Ajax combobox
  in a follow-up commit. Sites with many users see a larger <select>
  until then.
- Drop the now-unused user-search nonce field and the admin bundle's
  select2 dependency (still enqueued via admin-exclude until it migrates).

Accessibility: each select is labelled; keyboard operation is native.
Other Select2 screens (settings, alert config) are unchanged.
@shadyvb
shadyvb added this pull request to stack #1987 September 10, 2026 13:58
@shadyvb shadyvb changed the title ticket/XWPENG 54 native selects Replace Select2 with native selects on the records filter screen. Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant