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

Avoid nested paragraphs in description #980

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

PhilippeVay
Copy link
Contributor

A multi-block description already creates as many paragraphs as there are "blocks" of description and the partial view section.html nests it in a parent paragraph, which is invalid HTML and may cause several problem (with browser parsers, with screen-readers and other assistive technologies).

Changing container .sg-section-description for a div avoids nested p.

Example with this 3 paragraphs-long description:

// Title of section
//
// Paragraph 1
//
// Paragraph 2
//
// Paragraph 3
//
// markup: (…)

would now result in:

<div ng-bind-html="section.description |&nbsp;unsafe" class="sg sg-section-description ng-binding">
  <p class="sg">Paragraph 1</p>
  <p class="sg">Paragraph 2</p>
  <p class="sg">Paragraph 3</p>
</div>

With this modification, single-line descriptions are still parsed as a single paragraph p.sg and have this div as a container so both cases (single and multi-paragraphs descriptions) are fine.

@junaidrsd junaidrsd merged commit 5ce1a29 into SC5:master Aug 1, 2016
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