Roadmap β
INFO
Current pre-release version is v0.1.4. The first public release will be v0.2.0
Backlog & Considerations Ideas β
- π‘ Add specific use case examples to the repository (two main priorities: generate Twig & React templates, example YAML format to describe components)
- π‘ Consider PHP Attributes to improve the code or usage? Thinking mainly of selfClosing, block level or even replace childOf, parentOf methods? Use reflection to resolve relations instead of just using it on a per instance basis.
- π‘ How to make use of parentOf/childOf? (eg: validation? prevent adding invalid children? allow force? does HTMLDocument check this? Test it.)
- π‘ Consider using Symfony Serializer and encoder to transform YAML file that describes components into a HTMLDocument or fragment object, or even directly to an output format such as a Twig template. Similar to DOM-ORM where I turned xml into Entity objects and vice versa.
- π‘ In order to being able to instantiate an HTML Element class without a DOM, we could create it in its own DOM, and only import it into a different DOM, when needed.
- π‘ think about Schema.org schemata and if they should be part of any class or specs
- π‘consider renaming to HTML.php
- Investigate WCAG 2.2 and ARIA specs and how to implement them in the library (possibly with separate mixin specs one can recompile things with)
html5-with-aria.yaml
,html5-with-wcag.yaml
,html5-with-aria-and-wcag.yaml
- Investigate how WCAG can be enforced or HTML can be analyzed (eg. by throwing exceptions when invalid attributes are set), probably requires a long list or matrix of rules. Find inconsistencies,
Done Pre-Release 0.1.4 β
- Fix inconsistencies in the HTML5 specification
- Add basic functionality and compatibility tests for Delegators
- Mark deprecated attributes (e.g., clear in
<br>
, align in<hr>
) as deprecated in PHP, too. - Add chainable setters for all attributes
- Finalize Delegator tests (above 98% yay)
- Fix issues with
body
. doesnt have childOf HTML 2. unique per parent isn't true although its unique per document. Add more tests for this. - Handle different kinds of attributes that go by the same name correctly (eg.
type
is used in<button|input>
vs<link|a|...>
vs<ol>
). Create an OlTypeEnum, LinkTypeEnum, if needed. - Allow for union types for mixed attributes - (eg. target which can be both a TargetEnum (_self, _blank, etc.) and a string value)
- Add getters/setters for all global attributes to HTMLDocumentDelegator
Work in Progress & Pending Milestone 0.2.0 β
- Properly link between relevant sections in the docs. Add links to external resources where appropriate.
- Add more examples to the documentation.
- Allow adding
data-attributes
as array. eg->setAttrbutes(['data' => ['attribute' => 'value'])
would becomedata-attribute="value"
. Also->setData(['attribute' => 'value'])
should work or->data = ['attribute' => 'value']
. The same logic or functionality would apply toaria
anditemprop
as well. - Add chainable setters to native properties such as
textContent
andnodeValue
and add atextContent
param to Element constructor or create() method. Or modify to be createElement with standard signature. - Add missing interfaces, implement all methods from Traits. Add missing tests for these.