Skip to content

Commit

Permalink
Remove accordion <sup> examples
Browse files Browse the repository at this point in the history
These examples were added to test a different combination of HTML elements in the
accordion component. However, the <sup> element specifically pushes text in the
accordion out of line and therefore requires additional styling if it's going to be
used (vertical-align: top). We also don't think it's likely that a user would want
to use <sup> inside the summary line.

This commit removes the <sup> from the accordion examples. The existing examples still
test the accordion when passing in HTML content, so that is still covered.
  • Loading branch information
Vanita Barrett authored and hannalaakso committed Oct 13, 2021
1 parent 57718a0 commit f17f144
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/views/full-page-examples/campaign-page/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ notes: >-
},
expanded: true,
content: {
html: "<p class='govuk-body'>This is the content for Staying for the<sup>1</sup> web.</p>"
html: "<p class='govuk-body'>This is the content for Staying for the web.</p>"
}
},
{
Expand Down Expand Up @@ -165,7 +165,7 @@ notes: >-
text: "Providing assisted digital support"
},
summary: {
html: "<span class='govuk-!-font-weight-regular'>Helping people who don't have the skills or access to use a service.<sup>1</sup></span>"
html: "<span class='govuk-!-font-weight-regular'>Helping people who don't have the skills or access to use a service.</span>"
},
content: {
html: "<ul class='govuk-list'><li><a class='govuk-link' href='#'>Making your service accessible: an introduction</a></li><li><a class='govuk-link' href='#'>Understanding WCAG 2.1</a></li><li><a class='govuk-link' href='#'>Getting an accessibility audit</a></li><li><a class='govuk-link' href='#'>Testing for accessibility</a></li><li><a class='govuk-link' href='#'>Publishing information about your service's accessibility</a></li></ul>"
Expand Down
4 changes: 2 additions & 2 deletions src/govuk/components/accordion/accordion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ examples:
<li>Example item 1</li>
</ul>
- heading:
text: Praesent faucibus leo feugiat libero pharetra lacinia. Aliquam aliquet ante vitae mollis vestibulum.
text: Praesent faucibus leo feugiat libero pharetra lacinia. Aliquam aliquet ante vitae mollis vestibulum.
summary:
html: <span class="govuk-!-font-weight-regular">Maecenas nec <abbr>est</abbr> sapien<sup>1</sup>. Etiam varius luctus mauris non porttitor. </span>
html: <span class="govuk-!-font-weight-regular">Maecenas nec <abbr>est</abbr> sapien. Etiam varius luctus mauris non porttitor. </span>
content:
html: |
<ul class="govuk-list govuk-list--bullet">
Expand Down

0 comments on commit f17f144

Please sign in to comment.