Add dedicated classes for missing HTML tags (#268)#278
Open
Mister-42 wants to merge 5 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #278 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 837 1062 +225
============================================
Files 91 138 +47
Lines 2265 2757 +492
============================================
+ Hits 2265 2757 +492 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds dedicated tag classes and Html helper factory methods for a set of previously-missing HTML elements (Issue #268), along with test coverage and documentation updates.
Changes:
- Introduce new
Yiisoft\Html\Tag\*classes for missing HTML tags (e.g.Abbr,Details,Dialog,Template,Time, etc.). - Extend
Yiisoft\Html\Htmlwith new static factory methods for these tags and add corresponding integration tests. - Update README tag/method listings and add a CHANGELOG entry for #268.
Reviewed changes
Copilot reviewed 88 out of 88 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Tag/VarTest.php | Adds unit test for <var> tag class. |
| tests/Tag/UTest.php | Adds unit test for <u> tag class. |
| tests/Tag/TimeTest.php | Adds unit tests for <time> tag and datetime() attribute. |
| tests/Tag/TemplateTest.php | Adds unit test for <template> tag class. |
| tests/Tag/SupTest.php | Adds unit test for <sup> tag class. |
| tests/Tag/SummaryTest.php | Adds unit test for <summary> tag class. |
| tests/Tag/SubTest.php | Adds unit test for <sub> tag class. |
| tests/Tag/STest.php | Adds unit test for <s> tag class. |
| tests/Tag/SlotTest.php | Adds unit test for <slot> tag class. |
| tests/Tag/SearchTest.php | Adds unit test for <search> tag class. |
| tests/Tag/SampTest.php | Adds unit test for <samp> tag class. |
| tests/Tag/RubyTest.php | Adds unit test for <ruby> tag class. |
| tests/Tag/RtTest.php | Adds unit test for <rt> tag class. |
| tests/Tag/RpTest.php | Adds unit test for <rp> tag class. |
| tests/Tag/QTest.php | Adds unit tests for <q> tag and cite() attribute. |
| tests/Tag/ProgressTest.php | Adds unit tests for <progress> and max() / value() attributes. |
| tests/Tag/OutputTest.php | Adds unit test for <output> tag class. |
| tests/Tag/MeterTest.php | Adds unit tests for <meter> and numeric attribute setters. |
| tests/Tag/MenuTest.php | Adds unit test for <menu> list rendering. |
| tests/Tag/MarkTest.php | Adds unit test for <mark> tag class. |
| tests/Tag/MapTest.php | Adds unit test for <map> tag class. |
| tests/Tag/MainTest.php | Adds unit test for <main> tag class. |
| tests/Tag/KbdTest.php | Adds unit test for <kbd> tag class. |
| tests/Tag/InsTest.php | Adds unit tests for <ins> and cite() / datetime() attributes. |
| tests/Tag/IframeTest.php | Adds unit tests for <iframe> and src() attribute. |
| tests/Tag/HeadTest.php | Adds unit test for <head> composition and encoding control. |
| tests/Tag/FigureTest.php | Adds unit test for <figure> composition and encoding control. |
| tests/Tag/FigcaptionTest.php | Adds unit test for <figcaption> tag class. |
| tests/Tag/DtTest.php | Adds unit test for <dt> tag class. |
| tests/Tag/DlTest.php | Adds unit test for <dl> composition and encoding control. |
| tests/Tag/DialogTest.php | Adds unit test for <dialog> tag class. |
| tests/Tag/DfnTest.php | Adds unit test for <dfn> tag class. |
| tests/Tag/DetailsTest.php | Adds unit test for <details> composition and encoding control. |
| tests/Tag/DelTest.php | Adds unit tests for <del> and cite() / datetime() attributes. |
| tests/Tag/DdTest.php | Adds unit test for <dd> tag class. |
| tests/Tag/DataTest.php | Adds unit tests for <data> and value() attribute. |
| tests/Tag/CiteTest.php | Adds unit test for <cite> tag class. |
| tests/Tag/CanvasTest.php | Adds unit test for <canvas> tag class. |
| tests/Tag/BlockquoteTest.php | Adds unit tests for <blockquote> and cite() attribute. |
| tests/Tag/BdoTest.php | Adds unit test for <bdo> tag class. |
| tests/Tag/BdiTest.php | Adds unit test for <bdi> tag class. |
| tests/Tag/AbbrTest.php | Adds unit test for <abbr> tag class. |
| tests/HtmlTest.php | Extends Html helper integration tests for newly added tags. |
| src/Tag/Var_.php | Adds <var> tag class implementation. |
| src/Tag/U.php | Adds <u> tag class implementation. |
| src/Tag/Time.php | Adds <time> tag class with datetime() attribute setter. |
| src/Tag/Template.php | Adds <template> tag class implementation. |
| src/Tag/Sup.php | Adds <sup> tag class implementation. |
| src/Tag/Summary.php | Adds <summary> tag class implementation. |
| src/Tag/Sub.php | Adds <sub> tag class implementation. |
| src/Tag/Slot.php | Adds <slot> tag class implementation. |
| src/Tag/Search.php | Adds <search> tag class implementation. |
| src/Tag/Samp.php | Adds <samp> tag class implementation. |
| src/Tag/S.php | Adds <s> tag class implementation. |
| src/Tag/Ruby.php | Adds <ruby> tag class implementation. |
| src/Tag/Rt.php | Adds <rt> tag class implementation. |
| src/Tag/Rp.php | Adds <rp> tag class implementation. |
| src/Tag/Q.php | Adds <q> tag class with cite() attribute setter. |
| src/Tag/Progress.php | Adds <progress> tag class with numeric attribute setters. |
| src/Tag/Output.php | Adds <output> tag class implementation. |
| src/Tag/Meter.php | Adds <meter> tag class with numeric attribute setters. |
| src/Tag/Menu.php | Adds <menu> tag class based on ListTag. |
| src/Tag/Mark.php | Adds <mark> tag class implementation. |
| src/Tag/Map.php | Adds <map> tag class implementation. |
| src/Tag/Main.php | Adds <main> tag class implementation. |
| src/Tag/Kbd.php | Adds <kbd> tag class implementation. |
| src/Tag/Ins.php | Adds <ins> tag class with cite() / datetime() attribute setters. |
| src/Tag/Iframe.php | Adds <iframe> tag class with src() attribute setter. |
| src/Tag/Head.php | Adds <head> tag class implementation. |
| src/Tag/Figure.php | Adds <figure> tag class implementation. |
| src/Tag/Figcaption.php | Adds <figcaption> tag class implementation. |
| src/Tag/Dt.php | Adds <dt> tag class implementation. |
| src/Tag/Dl.php | Adds <dl> tag class implementation. |
| src/Tag/Dialog.php | Adds <dialog> tag class implementation. |
| src/Tag/Dfn.php | Adds <dfn> tag class implementation. |
| src/Tag/Details.php | Adds <details> tag class implementation. |
| src/Tag/Del.php | Adds <del> tag class with cite() / datetime() attribute setters. |
| src/Tag/Dd.php | Adds <dd> tag class implementation. |
| src/Tag/Data.php | Adds <data> tag class with value() attribute setter. |
| src/Tag/Cite.php | Adds <cite> tag class implementation. |
| src/Tag/Canvas.php | Adds <canvas> tag class implementation. |
| src/Tag/Blockquote.php | Adds <blockquote> tag class with cite() attribute setter. |
| src/Tag/Bdo.php | Adds <bdo> tag class implementation. |
| src/Tag/Bdi.php | Adds <bdi> tag class implementation. |
| src/Tag/Abbr.php | Adds <abbr> tag class implementation. |
| src/Html.php | Adds new Html::tagName() factory methods and imports for the new tag classes. |
| README.md | Updates documented tag classes and Html helper method groups. |
| CHANGELOG.md | Adds release note entry for #268. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vjik
requested changes
Jun 12, 2026
- Remove media() from Area (not a valid HTML attribute) - Rename Object_ to ObjectTag, Var_ to VarTag - Remove TagContentTrait from Iframe (content model: Nothing) - Change Html::iframe() signature to iframe(?string , array ) - Update ListTag phpdoc to mention menu - Simplify README tag class list per suggestion - Fix tag ordering in README and update renamed classes - Add testImmutability() for all new tag classes with attribute methods
vjik
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Testing local AI, this Issue seemed a perfect candidate. Close if improper.