Skip to content

Commit

Permalink
Update accessibility criteria in component docs
Browse files Browse the repository at this point in the history
Update the accessibility criteria in in the components docs for the breadcrumbs and step by step navigation header components, stating they should be placed before the `<main>` element to avoid failing WCAG 2.2 success criterion 2.4.1 Bypass Blocks (Level A)
  • Loading branch information
MartinJJones committed Sep 19, 2024
1 parent ddd2668 commit 63d4350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ body: |
We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
shared_accessibility_criteria:
- link
accessibility_criteria:
accessibility_criteria: |
The breadcrumb links must have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
(this especially applies when [using the inverse flag](/component-guide/breadcrumbs/inverse)).
Always place breadcrumbs at the top of a page, before the `<main>` element. Placing them here means that the "Skip to main content" link allows the user to skip all navigation links, including breadcrumbs. This relates to WCAG 2.2 success criterion [2.4.1 Bypass Blocks (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/bypass-blocks).
accessibility_excluded_rules:
- skip-link # This component is creating a reference to #content which is part of the layout
display_html: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ accessibility_criteria: |
An earlier version of the component did not use a heading element &ndash; this failed WCAG 2.1 Success Criterion 1.3.1 ("Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.")
An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
Always place the step by step navigation header at the top of a page, before the `<main>` element. Placing the component here means that the "Skip to main content" link allows the user to skip all navigation links, including the step by step navigation header. This relates to WCAG 2.2 success criterion [2.4.1 Bypass Blocks (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/bypass-blocks).
shared_accessibility_criteria:
- link
examples:
Expand Down

0 comments on commit 63d4350

Please sign in to comment.