From 25bb75ba27c9d1aecb4f6bf6b8e512aaa4a7dfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20R=C3=B8ed?= Date: Tue, 21 Apr 2026 12:25:35 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20template-no-invalid-aria-attributes?= =?UTF-8?q?=20=E2=80=94=20accept=20"undefined"=20as=20valid=20token=20for?= =?UTF-8?q?=20aria-orientation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per aria-query 5.3.2, `aria-orientation` has `type: 'token'` with `values: ['vertical', 'undefined', 'horizontal']` — i.e. the literal string "undefined" is an explicit, valid token. Our previous implementation short-circuited on `value === 'undefined'` by returning `Boolean(attrDef.allowundefined)` before the token check. Because `aria-orientation` carries `allowundefined: false` in aria-query, the valid token "undefined" was incorrectly rejected. Fix: before applying the generic `allowundefined` shortcut, check whether the attribute is a `token`/`tokenlist` whose `values` array explicitly includes `'undefined'`. If so, the value is valid regardless of `allowundefined`. Regression tests cover the valid (`undefined`, `horizontal`) and invalid (`sideways`) cases for `aria-orientation`, in both `