Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap component text with <p> where semantics are missing #1613

Closed
wants to merge 1 commit into from

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Oct 11, 2019

The Inset text and Panel components are styled <div> tags.

Plain text via params.text should be wrapped with <p></p> to improve semantics, and it's better to have sensible defaults than to assume developers will use params.html.

I've also included a fix for Warning text but due to enclosing <strong> and <span> it's a slightly different fix to the other two.

Fixes #1611 and alphagov/govuk-design-system#822

Before
Before

After
After

@NickColley NickColley added the awaiting triage Needs triaging by team label Oct 11, 2019
@NickColley
Copy link
Contributor

Thanks for jumping on this, I believe there may be other components (such as accordions), that we would want to consider this.

I've put the awaiting triage label on this so the GOV.UK Design System team can get together and decide if this is the direction we want to go in.

@colinrotherham
Copy link
Contributor Author

Thanks @NickColley.

Good point about the accordion, I've pushed again with the same applies to its "content" divs!

Consider this a proof of concept, see what you all think 😊

@hannalaakso
Copy link
Member

hannalaakso commented Oct 18, 2019

We've added #1611 to our list of Accessibility Improvements for GOV.UK Frontend under "Could" as we're not sure yet if this is the correct approach. Thanks for raising @colinrotherham 👍

@hannalaakso
Copy link
Member

hannalaakso commented Oct 23, 2019

As this would be a breaking change we're not able to merge this right now. We would like to look at this but will have to wait until we release GOV.UK Frontend 4.0 which is not yet imminent.

Thanks for all your work on this @colinrotherham we'll use this PR as the basis of exploring this for 4.0. We're going to close this PR and have added the issue you raised to the 4.0 milestone.

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.

All sentences should be inside <p> (or the relevant semantic elements)
4 participants