From f1d116873e729a2f862110defd22e70a70cfa850 Mon Sep 17 00:00:00 2001 From: Conor Sinclair Date: Mon, 9 Nov 2026 23:09:46 +0100 Subject: [PATCH] feat: let a host form field label and describe Flicker.select/1 Add aria_labelledby, aria_describedby and aria_invalid to Flicker.select/1. The colocated .Nav hook now pushes "query" for text that arrives with no key held, such as a context-menu paste, drag and drop, or autofill. --- lib/flicker.ex | 27 ++++++ lib/flicker/components/select.ex | 44 ++++++++- test/flicker/select_field_aria_test.exs | 123 ++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 test/flicker/select_field_aria_test.exs diff --git a/lib/flicker.ex b/lib/flicker.ex index aac8b4a..dace0d6 100644 --- a/lib/flicker.ex +++ b/lib/flicker.ex @@ -253,6 +253,30 @@ defmodule Flicker do doc: "Input placeholder. Defaults to the `:search_placeholder` message." ) + attr(:aria_labelledby, :string, + default: nil, + doc: """ + The id of a host element that names the combobox input, such as the + form field's own `