Skip to content

HTML API: Add support for group of containers including ARTICLE element - #5538

Closed
dmsnell wants to merge 1 commit into
WordPress:trunkfrom
dmsnell:html-api/add-support-for-remaining-address-article-group
Closed

HTML API: Add support for group of containers including ARTICLE element#5538
dmsnell wants to merge 1 commit into
WordPress:trunkfrom
dmsnell:html-api/add-support-for-remaining-address-article-group

Conversation

@dmsnell

@dmsnell dmsnell commented Oct 20, 2023

Copy link
Copy Markdown
Member

Trac ticket: Core-59914

There are a handful of elements the behave similarly and are generically
container elements. These are the following elements:

ADDRESS, ARTICLE, ASIDE, BLOCKQUOTE, CENTER, DETAILS, DIALOG, DIR,
DL, DIV, FIELDSET, FIGCAPTION, FIGURE, FOOTER, HEADER, HGROUP, MAIN,
MENU, NAV, SEARCH, SECTION, SUMMARY,

This patch adds support to the HTML Processor for handling these elements.
They do not require any additional logic in the rest of the class, and carry
no specific semantic rules for parsing beyond what is listed in their group
in the IN BODY section of the HTML5 specification

@dmsnell
dmsnell force-pushed the html-api/add-support-for-remaining-address-article-group branch from 7fc51fe to 7f703c3 Compare November 15, 2023 19:38
@dmsnell
dmsnell marked this pull request as ready for review November 15, 2023 19:38
@dmsnell
dmsnell force-pushed the html-api/add-support-for-remaining-address-article-group branch from 7f703c3 to d0b8f37 Compare November 15, 2023 20:58
Comment thread src/wp-includes/html-api/class-wp-html-processor.php Outdated
Comment thread tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
@dmsnell
dmsnell force-pushed the html-api/add-support-for-remaining-address-article-group branch from d0b8f37 to 6e25b34 Compare November 16, 2023 15:38
There are a handful of elements the behave similarly and are generically
container elements. These are the following elements:

    ADDRESS, ARTICLE, ASIDE, BLOCKQUOTE, CENTER, DETAILS, DIALOG, DIR,
    DL, DIV, FIELDSET, FIGCAPTION, FIGURE, FOOTER, HEADER, HGROUP, MAIN,
    MENU, NAV, SEARCH, SECTION, SUMMARY,

This patch adds support to the HTML Processor for handling these elements.
They do not require any additional logic in the rest of the class, and carry
no specific semantic rules for parsing beyond what is listed in their group
in the IN BODY section of the HTML5 specification.

Co-authored-by: Bernie Reiter <bernhard-reiter@git.wordpress.org>
@dmsnell
dmsnell force-pushed the html-api/add-support-for-remaining-address-article-group branch from 6e25b34 to 0dc859f Compare November 16, 2023 15:43

@ockham ockham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing my feedback! I'm wrapping up work for tonight, but I'm planning to land this tomorrow 😄

LGTM 🚢

@ockham

ockham commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

BTW really appreciate the test coverage -- they're easy to read and follow, and provide a lot of confidence in the code changes! 🙌

@ockham

ockham commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

Committed to Core in https://core.trac.wordpress.org/changeset/57115.

@ockham ockham closed this Nov 17, 2023
@dmsnell
dmsnell deleted the html-api/add-support-for-remaining-address-article-group branch November 17, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants