Skip to content

Commit

Permalink
Remove breadcrumbs example from inverse_header docs
Browse files Browse the repository at this point in the history
It's not possible to include the breadcrumbs inside the header component without ending up with a WCAG fail because the variant places it inside the <main> container since the header itself is inside the main.

Also updated the `with_link` example to be `with_paragraph_and_link`
  • Loading branch information
MartinJJones committed Sep 23, 2024
1 parent 5a80322 commit 44483db
Showing 1 changed file with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Inverse header
description: A wrapper to contain header content in white text
body: |
This component can be passed a block of template code and will wrap it in a blue header. This is as light-touch as possible and doesn't attempt to deal with the margins and paddings of its content. White text is enforced on content and would need to be overridden where unwanted. Implemented to accommodate topic and list page headings and breadcrumbs but unopinionated about its contents.
This component can be passed a block of template code and will wrap it in a blue header. This is as light-touch as possible and doesn't attempt to deal with the margins and paddings of its content. White text is enforced on content and would need to be overridden where unwanted. Implemented to accommodate topic and list page headings but unopinionated about its contents.
If passing links to the block make sure to add [the inverse modifier](https://design-system.service.gov.uk/styles/typography/#links-on-dark-backgrounds).
accessibility_criteria: |
The component must:
* be used in conjunction with content that renders a text contrast ratio higher than 4.5:1 against the header colour to meet WCAG AA.
accessibility_excluded_rules:
- skip-link # Examples of this component contain breadcrumbs, creating a reference to #content which is part of the layout
examples:
default:
data:
Expand Down Expand Up @@ -45,31 +41,7 @@ examples:
} %>
<p class="publication-header__last-changed">Published 22 April 2016</p>
<!-- end of example content -->
with_breadcrumbs_and_paragraph:
data:
padding_top: false
block: |
<!-- example content -->
<%= render "govuk_publishing_components/components/breadcrumbs", {
collapse_on_mobile: true,
breadcrumbs: [
{
title: "Section",
url: "/section"
},
{
title: "Education of disadvantaged children",
url: "/section/sub-section"
}
],
inverse: true
} %>
<%= render "govuk_publishing_components/components/lead_paragraph", {
text: "Schools and academies, further and higher education, apprenticeships and other skills training, student funding, early years.",
inverse: true
} %>
<!-- end of example content -->
with_link:
with_paragraph_and_link:
data:
block: |
<p class="gem-c-lead-paragraph gem-c-lead-paragraph--inverse">
Expand Down

0 comments on commit 44483db

Please sign in to comment.