Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge #5299
Browse files Browse the repository at this point in the history
5299: For #5296 Improve a11y for error pages r=Amejia481 a=mcarare

Use role="presentation" for `<ul>` to remove `<li>` semantics for screen reader.
Remove `<p>` from errorShortDesc because paragraphs cannot contain lists.




Co-authored-by: mcarare <[email protected]>
  • Loading branch information
MozLando and mcarare committed Dec 19, 2019
2 parents c4da824 + 15d6279 commit 54e790c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ object ErrorPages {
.replace("%button%", context.getString(errorType.refreshButtonRes))
.replace("%messageShort%", context.getString(errorType.titleRes))
.replace("%messageLong%", context.getString(errorType.messageRes, uri))
.replace("<ul>", "<ul role=\"presentation\">")
.replace("%css%", css)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<html xmlns="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width; user-scalable=false;" />
<title>%pageTitle%</title>
<style>%css%</style>
Expand All @@ -26,7 +26,7 @@ <h1 id="et_dnsNotFound" class="errorTitleText">%messageShort%</h1>

<!-- Short Description -->
<div id="errorShortDesc">
<p id="errorShortDescText">%messageLong%</p>
%messageLong%
</div>

</div>
Expand Down
5 changes: 4 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ permalink: /changelog/
* `FxaPushSupportFeature` is now needed for integrating Firefox Accounts with Push support.

* **support-test-libstate**
* 🆕 New component providing utilities to test functionality that relies on lib-state.
* 🆕 New component providing utilities to test functionality that relies on lib-state.

* **browser-errorpages**
* Removed list items semantics to improve a11y for unordered lists, preventing items being read twice.

* **support-locale**
* Add `resetToSystemDefault` and `getSystemDefault` method to `LocaleManager`
Expand Down

0 comments on commit 54e790c

Please sign in to comment.