diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 1819b691a3..5b21d0619c 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove inline styles and address basic accessibilty issues on rescue templates. + + *Jacob Herrington* + * Add support for 'private, no-store' Cache-Control headers. Previously, 'no-store' was exclusive; no other directives could be specified. diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb index 1fbc107e28..f6637b70c8 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb @@ -1,7 +1,7 @@

Blocked host: <%= @host %>

-
+

To allow requests to <%= @host %>, add the following to your environment configuration:

config.hosts << "<%= @host %>"
-
+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb index cd808c072f..a68eaab8d7 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb @@ -7,7 +7,7 @@ -
+
<%= render "rescues/message_and_suggestions", exception: @exception %> <%= render "rescues/actions", exception: @exception, request: @request %> @@ -32,4 +32,4 @@ <% end %> <%= render template: "rescues/_request_and_response" %> -
+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb index e887ef5886..3743994e48 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb @@ -1,4 +1,4 @@ -
+

<%= @exception.class.to_s %> <% if @request.parameters['controller'] %> @@ -7,7 +7,7 @@

-
+

<%= h @exception.message %> <% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %> @@ -21,4 +21,4 @@ <%= render "rescues/source", source_extracts: @source_extracts, show_source_idx: @show_source_idx %> <%= render "rescues/trace", traces: @traces, trace_to_show: @trace_to_show %> <%= render template: "rescues/_request_and_response" %> -

+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb index cedf18853f..19dbabe5a2 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb @@ -129,7 +129,7 @@ .source .data .line_numbers { background-color: #ECECEC; - color: #AAA; + color: #555; padding: 1em .5em; border-right: 1px solid #DDD; text-align: right; @@ -261,7 +261,7 @@ -<%= yield %> + <%= yield %> diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb index 76ab1691b5..ca8f213719 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb @@ -1,8 +1,8 @@ -
+

No template for interactive request

-
+

<%= h @exception.message %>

@@ -16,4 +16,4 @@ since we expect an HTML template to be rendered for such requests. If that's the case, carry on.

-
+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb index 22eb6e9b4e..576d2e3597 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb @@ -1,11 +1,11 @@ -
+

Template is missing

-
+

<%= h @exception.message %>

<%= render "rescues/source", source_extracts: @source_extracts, show_source_idx: @show_source_idx %> <%= render "rescues/trace", traces: @traces, trace_to_show: @trace_to_show %> <%= render template: "rescues/_request_and_response" %> -
+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb index 2b8f3f2a5e..8a03c7a3ba 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb @@ -1,7 +1,7 @@ -
+

Routing Error

-
+

<%= h @exception.message %>

<% unless @exception.failures.empty? %>

@@ -29,4 +29,4 @@ <% end %> <%= render template: "rescues/_request_and_response" %> -

+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb index 324ef1567a..8bf661ad22 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb @@ -1,11 +1,11 @@ -
+

<%= @exception.cause.class.to_s %> in <%= @request.parameters["controller"].camelize if @request.parameters["controller"] %>#<%= @request.parameters["action"] %>

-
+

Showing <%= @exception.file_name %> where line #<%= @exception.line_number %> raised:

@@ -17,4 +17,4 @@ <%= render "rescues/trace", traces: @traces, trace_to_show: @trace_to_show %> <%= render template: "rescues/_request_and_response" %> -
+ diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb index 9448989806..dd78f1b5aa 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb @@ -1,6 +1,6 @@ -
+

Unknown action

-
+
<%= render "rescues/message_and_suggestions", exception: @exception %> -
+