Error page CSS and a11y improvements #41874
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
There are two main parts of this pull request:
1. Improvements to the existing CSS and removing inline styles
I noticed that there are quite a few inline styles in these templates.
Of course, that's not inherently wrong, but it does make it a little hard to find the CSS if you spot a bug and can cause bugs.
In order to make maintaining these templates a bit easier, I removed as many inline styles as possible (those which are not relying on erb). I believe this change fixes at least one styling bug where inline styles were competing with the styles defined in the layout.
Additionally, I eliminated a couple of unnecessary rules and tweaked a JS function so that it should behave more consistently.
2. Addressing (really, really) basic accessibility issues
I intentionally tried not to change any selectors that folks might be making assumptions about on this page, to avoid breaking any tools that might be floating around. However, the container
div
s becamemain
s to address a lack of landmark elements.There are only two visible UI changes in this PR.
Line numbers were darkened slightly to increase color contrast (a11y):
An extremely light hover effect was applied to this link to indicate interactivity:
I'd like to make more drastic changes in support of making these pages more friendly to assistive technologies, but I don't want to invest the time if that's something the maintainers aren't willing to merge in the name of stability (as some changes might significantly modify the page).
Other Information