Skip to content

Commit

Permalink
Merge pull request #177 from DFE-Digital/1434-cbl-static-pages
Browse files Browse the repository at this point in the history
Add static pages
  • Loading branch information
steventux authored Jan 2, 2024
2 parents 3cfbb82 + 0d2412a commit 115adb7
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/controllers/static_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

class StaticController < ApplicationController
skip_before_action :authenticate_dsi_user!
skip_before_action :handle_expired_session!

layout "two_thirds"

def accessibility
end

def cookies
end
end
2 changes: 1 addition & 1 deletion app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<%= govuk_link_to("Cookies", "/cookies", class: "govuk-footer__link") %>
</li>
<li class="govuk-footer__inline-list-item">
<%= govuk_link_to("Privacy notice", "/privacy", class: "govuk-footer__link") %>
<%= govuk_link_to("Privacy notice", "https://www.gov.uk/government/publications/privacy-information-education-providers-workforce-including-teachers", class: "govuk-footer__link") %>
</li>
</ul>

Expand Down
71 changes: 71 additions & 0 deletions app/views/static/accessibility.html.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<% content_for :page_title, 'Accessibility statement' %>

# Accessibility statement

This statement applies to the <%= t('service.name') %> service.

This service is run by the Department for Education. We want as many people as possible to be able to use it. You should be able to:

- change colours, contrast levels and fonts
- zoom in up to 300% without the text spilling off the screen
- navigate most of the service using just a keyboard
- navigate most of the service using speech recognition
software
- listen to most of the service using a screen reader (including the most recent
versions of JAWS, NVDA and VoiceOver)

We’ve also made the text in the service as simple as possible to understand.

[AbilityNet](https://mcmw.abilitynet.org.uk/) has advice on making your device
easier to use if you have a disability.

## How accessible this service is

All parts of this service are fully accessible.

## Reporting accessibility problems with this service

We are always looking to improve the accessibility of this service.

If you find any problems not listed on this page or think we are not meeting accessibility requirements, contact us:

Email: <a href="mailto:<%=
t('service.email') %>" class="govuk-link govuk-link--no-visited-state"><%=
t('service.email') %></a>

<a class="govuk-link" href="http://www.w3.org/WAI/users/inaccessible">Read tips on contacting organisations about inaccessible websites</a>

## Enforcement procedure

The Equality and Human Rights Commission (EHRC) is responsible for enforcing
the Public Sector Bodies (Websites and Mobile Applications) (No. 2)
Accessibility Regulations 2018 (the ‘accessibility regulations’).

If you’re not happy with how we respond to your complaint, contact [the
Equality Advisory and Support Service
(EASS)](https://www.equalityadvisoryservice.com/).

## Technical information about this service’s accessibility

The Department for Education is committed to making this service accessible, in
accordance with the Public Sector Bodies (Websites and Mobile Applications)
(No. 2) Accessibility Regulations 2018.

## Compliance status

This service is fully compliant with [the Web Content Accessibility Guidelines
version 2.2 AA standard](https://www.w3.org/TR/WCAG22/).

There may be accessibility issues we have not found yet. If you find any please contact us so we can continue to improve the services we provide.

### Disproportionate burden

Not applicable

### Content not within scope of this accessibility statement

Not applicable

## Preparation of this accessibility statement

This statement was prepared on 12 June 2023.
9 changes: 8 additions & 1 deletion config/initializers/govuk_markdown.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# frozen_string_literal: true


class MarkdownTemplate
def self.call(template, source)
source ||= template.source

# Rails >= 7.1 does not work with the Redcarpet markdown renderer.
# There is an argument mismatch where a string is expected but an OutputBuffer is provided.
# This is a workaround to convert the buffer to a string.
erb_handler = ActionView::Template.registered_template_handler(:erb)
compiled_source = erb_handler.call(template, source)
compiled_source = ActionView::OutputBuffer.new( erb_handler.call( template, source ) )
compiled_source << '.to_s'
"GovukMarkdown.render(begin;#{compiled_source};end).html_safe"
end
end
Expand Down

0 comments on commit 115adb7

Please sign in to comment.