Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Invalid HTML bug in section label #3328

Merged
merged 7 commits into from
Apr 6, 2020
Merged

Invalid HTML bug in section label #3328

merged 7 commits into from
Apr 6, 2020

Conversation

OlgaLyubin
Copy link
Contributor

Resolves #3316

Overall change:
Replaced a div with a span within section label to fix invalid HTML syntax (div nested within an h2 element).
New DOM structure:
Screenshot 2020-04-02 at 18 07 30

Code changes:

  • Replaced a div with a span in section label.
  • Updated snapshots.

  • I have assigned myself to this PR and the corresponding issues
  • Automated jest tests added (for new features) or updated (for existing features)
  • This PR requires manual testing

@OlgaLyubin OlgaLyubin added the ws-home Tasks for the WS Home Team label Apr 2, 2020
@OlgaLyubin OlgaLyubin self-assigned this Apr 2, 2020
@@ -23,7 +23,7 @@ const paddingReverseDir = ({ dir }) =>
// This makes it work right. I don't fully understand how, but am
// eternally grateful to the Flexbugs project.
// https://github.com/philipwalton/flexbugs#flexbug-3
const FlexColumn = styled.div`
const FlexColumn = styled.span`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you check if we really need this FlexColumn or if we could try to merge it along with FlexRow, so we avoid having that many nested spans?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we remove FlexColumn or merge it with FlexRow everything still looks great on Chrome, FireFox and Safari. However, it causes the bar to get shifted down on Internet Explorer. And even though IE is a low priority browser for us, section labels are on every front page, so I don't think it's worth making this change just to avoid having a lot of spans in the DOM.

Screenshot 2020-04-03 at 11 42 43

Copy link
Contributor

Choose a reason for hiding this comment

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

All right, thanks for investing though :)

Copy link
Contributor

@DenisHdz DenisHdz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@j-pendlebury j-pendlebury left a comment

Choose a reason for hiding this comment

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

Makes sense, looks good 👍

@PriyaKR PriyaKR self-assigned this Apr 3, 2020
@PriyaKR
Copy link
Contributor

PriyaKR commented Apr 3, 2020

LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ws-home Tasks for the WS Home Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML issue - section label's h2 has nested div
5 participants