From e8442cdfb21a746bfb3b5503c637a6fe8895bead Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Mon, 20 Apr 2020 20:59:59 +1200 Subject: [PATCH] ISSUES: Plan psuedoclass lowering. --- ISSUES/psuedoclass-lowering.md | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/ISSUES/psuedoclass-lowering.md b/ISSUES/psuedoclass-lowering.md index eb22a8e..b457287 100644 --- a/ISSUES/psuedoclass-lowering.md +++ b/ISSUES/psuedoclass-lowering.md @@ -17,3 +17,43 @@ pages without JavaScript. However it is probably wise to discourage such patterns, as they do not communicate necessary state to accessibility tools. + +## Lowering Rules +`:active` -> interactive +`:any-link`, `:link` -> `:where([href], [src])` +`:blank` -> `:where(input[value=""])` +`:checked` -> `[checked]` +`:default` -> UNSUPPORTED (forms) +`:defined` -> UNSUPPORTED (custom elements) +`:dir(_)` -> `:where([dir=_], [dir=_] *)` +`:disabled` -> `[disabled]` +`:empty` -> would need to be handled by XML Conduit Stylist. +`:enabled` -> `:not([disabled])` +`:first-child` -> `:nth-child(1)` +`:first-of-type` -> `:nth-of-type(1)` +`:fullscreen` -> Handled elsewhere. +`:focus`, `:focus-visible` -> interactive +`:focus-within` -> interactive +`:host` -> UNSUPPORTED (custom elements) +`:host()` -> UNSUPPORTED (custom elements) +`:host-context()` -> UNSUPPORTED (custom elements) +`:hover` -> interactive +`:indeterminate` -> `[indeterminate]` +`:in-range` -> UNSUPPORTED (forms) +`:invalid` -> UNSUPPORTED (forms) +`:lang(_)` -> `:where([lang|=_], [lang|=_] *)` +`:last-child` -> `:nth-last-child(1)`, PROBABLY UNSUPPORTED +`:last-of-type` -> `:nth-last-of-type(1)`, PROBABLY UNSUPPORTED +`:only-child` -> `:nth-child(1):nth-last-child(1)`, PROBABLY UNSUPPORTED +`:only-of-type` -> `:nth-of-type(1):nth-last-of-type(1)`, PROBABLY UNSUPPORTED +`:optional` -> `:not([required])` +`:out-of-range` -> UNSUPPORTED (forms) +`:placeholder-shown` -> `:where(:not([value]), [value=""])` +`:readonly` -> `[readonly]` +`:read-write` -> `:not([readonly])` +`:required` -> `[required]` +`:root`, `:scope` -> `html`, or applied by XML Conduit stylist for more leniency. +`:state()` -> UNSUPPORTED (custom elements), may want an alternative. +`:target` -> `#_`, selected ID sourced from outside data. +`:valid` -> UNSUPPORTED (forms) +`:visited` -> requires special handling, with outside data. -- 2.30.2