diff --git a/app/views/sites/new.html.erb b/app/views/sites/new.html.erb index fe6f32f69..98bb83d17 100644 --- a/app/views/sites/new.html.erb +++ b/app/views/sites/new.html.erb @@ -13,27 +13,32 @@
<%= form.label :abbr %> - <%= form.text_field :abbr, class: "form-control" %> + <%= form.text_field :abbr, class: "form-control", aria: { describedby: "abbr-help" } %> + <%= I18n.t("activemodel.hint.site_form.abbr") %>
<%= form.label :tna_timestamp %> - <%= form.text_field :tna_timestamp, class: "form-control" %> + <%= form.text_field :tna_timestamp, class: "form-control", aria: { describedby: "tna-timestamp-help" } %> + <%= I18n.t("activemodel.hint.site_form.tna_timestamp").html_safe %>
<%= form.label :homepage %> - <%= form.text_field :homepage, class: "form-control" %> + <%= form.text_field :homepage, class: "form-control", aria: { describedby: "homepage-help" } %> + <%= I18n.t("activemodel.hint.site_form.homepage") %>
<%= form.label :hostname %> - <%= form.text_field :hostname, class: "form-control" %> + <%= form.text_field :hostname, class: "form-control", aria: { describedby: "hostname-help" } %> + <%= I18n.t("activemodel.hint.site_form.hostname") %>
<%= form.label :homepage_title %> - <%= form.text_field :homepage_title, class: "form-control" %> + <%= form.text_field :homepage_title, class: "form-control", aria: { describedby: "homepage-title-help" } %> + <%= I18n.t("activemodel.hint.site_form.homepage_title") %>
@@ -43,13 +48,15 @@ :id, :title, {}, - { multiple: true, class: "form-control" } + { multiple: true, class: "form-control", aria: { describedby: "extra-organisations-help" } } %> + <%= I18n.t("activemodel.hint.site_form.extra_organisations") %>
<%= form.label :homepage_furl %> - <%= form.text_field :homepage_furl, class: "form-control" %> + <%= form.text_field :homepage_furl, class: "form-control", aria: { describedby: "homepage-furl-help" } %> + <%= I18n.t("activemodel.hint.site_form.homepage_furl") %>
@@ -57,13 +64,15 @@ <%= form.collection_radio_buttons :global_type, Site::GLOBAL_TYPES, :to_s, - :humanize do |button| %> + :humanize, + aria: { describedby: "global-type-help" } do |button| %>
<%= button.label do %> <%= button.radio_button + button.text %> <% end %>
<% end %> + <%= I18n.t("activemodel.hint.site_form.global_type") %>
@@ -73,12 +82,14 @@
<%= form.label :query_params %> - <%= form.text_field :query_params, class: "form-control" %> + <%= form.text_field :query_params, class: "form-control", aria: { describedby: "query-params-help" } %> + <%= I18n.t("activemodel.hint.site_form.query_params") %>
-
+
<%= form.label :global_redirect_append_path %> - <%= form.check_box :global_redirect_append_path %> + <%= form.check_box :global_redirect_append_path, aria: { describedby: "global-redirect-append-path-help" } %> + <%= I18n.t("activemodel.hint.site_form.global_redirect_append_path") %>
@@ -86,18 +97,21 @@ <%= form.collection_radio_buttons :special_redirect_strategy, Site::SPECIAL_REDIRECT_STRATEGY_TYPES, :to_s, - :humanize do |button| %> + :humanize, + aria: { describedby: "special-redirect-strategy-help" } do |button| %>
<%= button.label do %> <%= button.radio_button + button.text %> <% end %>
<% end %> + <%= I18n.t("activemodel.hint.site_form.special_redirect_strategy") %>
<%= form.label :aliases %> - <%= form.text_area :aliases, class: "form-control" %> + <%= form.text_area :aliases, class: "form-control", aria: { describedby: "aliases-help" } %> + <%= I18n.t("activemodel.hint.site_form.aliases") %>
<%= form.submit 'Save', class: 'add-top-margin btn btn-success' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 6593fddd7..4c2551e0c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -33,6 +33,21 @@ en: query_params: Query params (Optional) special_redirect_strategy: Special redirect strategy (Optional) aliases: Aliases (Optional) + hint: + site_form: + abbr: This is the owning organisation abbreviation followed by the abbreviated site name, separated by an underscore. For example, the "Obesity West Midlands" site which is owned by Public Health England would be "phe_obesitywm" + host: This is the primary hostname for the site. For example, "www.example.com". + tna_timestamp: This is the last good capture from the UK Government Web Archives. For example, "20131002172858". If the site has not been crawled by the National Archives, set a stub timestamp "20201010101010". + homepage: This is the URL for the new site. + hostname: This is the primary hostname for the site. + homepage_title: This is the title for 404/410 pages, it defaults to the organisation title. It should fit into the sentence "Visit the new [title] site at [full URL or homepage]" + extra_organisations: These are the additional organisations which own this site. They are used for access control in Transition. + homepage_furl: This is the friendly URL displayed on 404/410 pages. It should redirect to the homepage. It doesn't need to include 'http' or 'https'. + global_type: This sets a global redirect or archive for all paths. If "Redirect", all site URLs will redirect to the Global new URL. If "Archive", all site URLs will show a page saying the site has been archived. + query_params: A significant querystring parameter is one which on the old website changes the content in a meaningful way - which we might therefore need to map to a different place. Query string parameters should be specified in lowercase; uppercase parameters will not be preserved during canonicalisation. Enter as a colon-separated list. + global_redirect_append_path: Should the path the user supplied be appended to the URL for the global redirect? + special_redirect_strategy: When the transition is partial, some tools or content will be left behind and managed by the previous supplier. If "Via aka", the supplier is redirecting some paths to our aka domain. If "supplier", the supplier is managing redirects to gov.uk. No traffic comes through Bouncer for this site. + aliases: This is a list of alias domains. Enter as a comma-separated list. mappings: success: all_created: '%{created}%{tagged_with}'