diff --git a/.prettierignore b/.prettierignore
index 9030ef035119b9..ceb86c0ffbdbe5 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -119,7 +119,6 @@ build/
/files/ru/webassembly/**/*.md
# zh-cn
-/files/zh-cn/learn/**/*.md
/files/zh-cn/learn/css/**/*.md
/files/zh-cn/learn/html/**/*.md
/files/zh-cn/learn/javascript/**/*.md
diff --git a/files/zh-cn/learn/accessibility/css_and_javascript/index.md b/files/zh-cn/learn/accessibility/css_and_javascript/index.md
index cabbf54f269a93..c1cd3489f3481d 100644
--- a/files/zh-cn/learn/accessibility/css_and_javascript/index.md
+++ b/files/zh-cn/learn/accessibility/css_and_javascript/index.md
@@ -64,7 +64,8 @@ h1 {
font-size: 5rem;
}
-p, li {
+p,
+li {
line-height: 1.5;
font-size: 1.6rem;
}
@@ -85,13 +86,16 @@ p, li {
```html
The water is very hot .
-Water droplets collecting on surfaces is called condensation .
+
+ Water droplets collecting on surfaces is called condensation .
+
```
你可能希望向强调的文本添加一些简单的颜色:
```css
-strong, em {
+strong,
+em {
color: #a60000;
}
```
@@ -103,7 +107,10 @@ strong, em {
允许缩写、首字母缩略词或初始化与其扩展关联的元素:
```html
-Web content is marked up using HTML .
+
+ Web content is marked up using
+ HTML .
+
```
同样,你可能希望以某种简单方式设置样式:
@@ -131,7 +138,9 @@ a {
color: #ff0000;
}
-a:hover, a:visited, a:focus {
+a:hover,
+a:visited,
+a:focus {
color: #a60000;
text-decoration: none;
}
@@ -157,7 +166,7 @@ a:active {
```html
Enter your name
-
+
```
@@ -248,7 +257,7 @@ JavaScript 还可能会中断无障碍,具体取决于其使用方式。
```html
Enter your name:
-
+
```
我们仅在提交表单时执行验证。这样,我们就不会过于频繁地更新 UI,反之则可能混淆屏幕阅读器(可能还有其他)用户:
@@ -257,16 +266,16 @@ JavaScript 还可能会中断无障碍,具体取决于其使用方式。
form.onsubmit = validate;
function validate(e) {
- errorList.innerHTML = '';
- for(var i = 0; i < formItems.length; i++) {
+ errorList.innerHTML = "";
+ for (var i = 0; i < formItems.length; i++) {
var testItem = formItems[i];
- if(testItem.input.value === '') {
- errorField.style.left = '360px';
+ if (testItem.input.value === "") {
+ errorField.style.left = "360px";
createLink(testItem);
}
}
- if(errorList.innerHTML !== '') {
+ if (errorList.innerHTML !== "") {
e.preventDefault();
}
}
@@ -282,11 +291,15 @@ function validate(e) {
```js
function createLink(testItem) {
- var listItem = document.createElement('li');
- var anchor = document.createElement('a');
- anchor.textContent = testItem.input.name + ' field is empty: fill in your ' + testItem.input.name + '.';
- anchor.href = '#' + testItem.input.name;
- anchor.onclick = function() {
+ var listItem = document.createElement("li");
+ var anchor = document.createElement("a");
+ anchor.textContent =
+ testItem.input.name +
+ " field is empty: fill in your " +
+ testItem.input.name +
+ ".";
+ anchor.href = "#" + testItem.input.name;
+ anchor.onclick = function () {
testItem.input.focus();
};
listItem.appendChild(anchor);
@@ -304,8 +317,7 @@ function createLink(testItem) {
```html
```
diff --git a/files/zh-cn/learn/accessibility/html/index.md b/files/zh-cn/learn/accessibility/html/index.md
index 761440760e6d45..33bdc74e77d6d7 100644
--- a/files/zh-cn/learn/accessibility/html/index.md
+++ b/files/zh-cn/learn/accessibility/html/index.md
@@ -1,5 +1,5 @@
---
-title: 'HTML:无障碍的良好基础'
+title: "HTML:无障碍的良好基础"
slug: Learn/Accessibility/HTML
---
@@ -83,11 +83,17 @@ slug: Learn/Accessibility/HTML
My subheading
-This is the first subsection of my document. I'd love people to be able to find this content!
+
+ This is the first subsection of my document. I'd love people to be able to
+ find this content!
+
My 2nd subheading
-This is the second subsection of my content. I think is more interesting than the last one.
+
+ This is the second subsection of my content. I think is more interesting than
+ the last one.
+
```
我们已经准备了一个更长的文本版本,供您试用于屏幕阅读器(请查看 [good-semantics.html](http://mdn.github.io/learning-area/accessibility/html/good-semantics.html))。如果您尝试在此过程中导航,您将看到这非常容易导航:
@@ -100,25 +106,26 @@ slug: Learn/Accessibility/HTML
人们有时会使用表现性 HTML 和换行符来编写标题,段落等,如下所示:
```html
-My heading
-
+My heading
This is the first section of my document.
-
+
I'll add another paragraph here too.
-
+
1. Here is
-
+
2. a list for
-
+
3. you to read
-
+
My subheading
-
-This is the first subsection of my document. I'd love people to be able to find this content!
-
+
+This is the first subsection of my document. I'd love people to be able to find
+this content!
+
My 2nd subheading
-
-This is the second subsection of my content. I think is more interesting than the last one.
+
+This is the second subsection of my content. I think is more interesting than
+the last one.
```
如果你使用屏幕阅读器试用更长内容的版本(请查阅 [bad-semantics.html](http://mdn.github.io/learning-area/accessibility/html/bad-semantics.html)),你不会有一个很好的经验 — 屏幕阅读器没有任何东西可以用作路标,所以你无法检索有用的目录,整个页面被看作一个巨大的块,所以它只是一次读出所有的内容。
@@ -144,9 +151,7 @@ This is the second subsection of my content. I think is more interesting than th
-
Header
-
@@ -165,7 +170,7 @@ This is the second subsection of my content. I think is more interesting than th
@@ -174,28 +179,22 @@ This is the second subsection of my content. I think is more interesting than th
-
-
-
+
-
Related
-
-
-
-
+