Skip to content

LeftColumn should not use section#14611

Merged
JamieB-gu merged 1 commit intomainfrom
left-column-should-not-use-section
Oct 6, 2025
Merged

LeftColumn should not use section#14611
JamieB-gu merged 1 commit intomainfrom
left-column-should-not-use-section

Conversation

@JamieB-gu
Copy link
Contributor

The section element is meant to be used for a standalone section of a document1. This generally is not what this LeftColumn component is used to represent. For example, it's most widely used to position a heading within the Section component, which typically already includes a section itself.

<LeftColumn
borderType={centralBorder}
borderColour={borderColour ?? palette('--article-border')}
size={leftColSize}
verticalMargins={verticalMargins}
hasPageSkin={hasPageSkin}
>

LeftColumn is for general-purpose, presentational usage, and therefore can't make assumptions about the semantics of the document in which it's used. As a result, a non-semantic element like div2 is a more appropriate choice.

Footnotes

  1. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/section

  2. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div

The `section` element is meant to be used for a standalone section of a
document. This generally is not what this `LeftColumn` component is used
to represent. For example, it's most widely used to position a heading
within the `Section` component, which typically already includes a
`section` itself.

`LeftColumn` is for general-purpose, presentational usage, and therefore
can't make assumptions about the semantics of the document in which it's
used. As a result, a non-semantic element like `div` is a more
appropriate choice.
@JamieB-gu JamieB-gu added this to the Health milestone Oct 3, 2025
@JamieB-gu JamieB-gu requested a review from a team October 3, 2025 14:23
@JamieB-gu JamieB-gu self-assigned this Oct 3, 2025
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@JamieB-gu JamieB-gu added the run_chromatic Runs chromatic when label is applied label Oct 3, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 3, 2025
@JamieB-gu JamieB-gu merged commit ad21271 into main Oct 6, 2025
32 checks passed
@JamieB-gu JamieB-gu deleted the left-column-should-not-use-section branch October 6, 2025 11:24
@gu-prout
Copy link

gu-prout bot commented Oct 6, 2025

Seen on PROD (merged by @JamieB-gu 7 minutes and 59 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants