Skip to content

Commit 4dac485

Browse files
Add CSS Anchor Positioning to Future Work section (#1167)
1 parent 6c7f459 commit 4dac485

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

FormControlRange/explainer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,15 @@ The resulting `AbstractRange` inheritance structure would look like this:
577577
![abstractrange-family](abstractrange-family.jpg)
578578

579579
## Potential Future Work
580+
### Extending to Custom Elements and Potential Renaming
580581
It has been [discussed](https://github.com/whatwg/html/issues/11478#issuecomment-3113360213) that custom elements could also use this API to expose encapsulated ranges, enabling richer editing or selection behaviors while maintaining internal structure.
581582
Such use cases might also prompt revisiting the current `FormControlRange` name in favor of something broader, such as `ElementRange`, to better reflect its applicability beyond form controls.
582583

584+
### Relationship to CSS Anchor Positioning
585+
As noted in the [W3C TAG early design review](https://github.com/w3ctag/design-reviews/issues/1142), some of the positioning use cases addressed by `FormControlRange` (such as anchoring popups or highlights to caret positions) could also be explored declaratively through future extensions to [CSS Anchor Positioning](https://drafts.csswg.org/css-anchor-position/).
586+
587+
While `FormControlRange` focuses on providing a programmatic mechanism aligned with existing Range APIs, a complementary declarative model in CSS could offer improved performance, reduced scripting overhead, and more consistent accessibility behavior.
588+
583589
## Open Questions
584590
#### How should `FormControlRange` behave when callers provide reversed offsets (i.e. `startOffset > endOffset`)?
585591

0 commit comments

Comments
 (0)