From 555458dee8950bdd26559ba4483d3e2ecf7da55b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 10 Sep 2022 23:51:56 -0400 Subject: [PATCH 1/7] style: run prettier on learn --- .../accessibility_troubleshooting/index.md | 8 +- .../index.md | 8 +- files/en-us/learn/accessibility/html/index.md | 2 +- .../en-us/learn/accessibility/mobile/index.md | 30 +- .../index.md | 8 +- .../accessibility/wai-aria_basics/index.md | 22 +- .../test_your_skills_colon__wai-aria/index.md | 8 +- .../common_web_layouts/index.md | 8 +- .../index.md | 26 +- .../html_features_for_accessibility/index.md | 3 +- files/en-us/learn/common_questions/index.md | 2 +- .../set_up_a_local_testing_server/index.md | 52 +- .../using_github_pages/index.md | 36 +- .../what_are_browser_developer_tools/index.md | 4 +- .../what_is_a_web_server/index.md | 4 +- .../a_cool_looking_box/index.md | 8 +- .../building_blocks/box_model_tasks/index.md | 8 +- .../cascade_and_inheritance/index.md | 16 +- .../building_blocks/cascade_tasks/index.md | 8 +- .../index.md | 8 +- .../fundamental_css_comprehension/index.md | 8 +- .../css/building_blocks/images_tasks/index.md | 8 +- .../building_blocks/overflow_tasks/index.md | 8 +- .../selectors/selectors_tasks/index.md | 8 +- .../css/building_blocks/sizing_tasks/index.md | 8 +- .../building_blocks/styling_tables/index.md | 6 +- .../css/building_blocks/tables_tasks/index.md | 8 +- .../index.md | 8 +- .../building_blocks/the_box_model/index.md | 2 +- .../building_blocks/values_and_units/index.md | 16 +- .../css/building_blocks/values_tasks/index.md | 8 +- .../writing_modes_tasks/index.md | 8 +- .../css/css_layout/flexbox_skills/index.md | 8 +- .../css/css_layout/floats_skills/index.md | 8 +- .../fundamental_layout_comprehension/index.md | 8 +- .../learn/css/css_layout/grid_skills/index.md | 8 +- .../css/css_layout/multicol_skills/index.md | 8 +- .../css/css_layout/position_skills/index.md | 8 +- .../learn/css/css_layout/rwd_skills/index.md | 8 +- .../styling_a_biography_page/index.md | 8 +- files/en-us/learn/css/howto/css_faq/index.md | 4 +- files/en-us/learn/css/index.md | 3 + .../typesetting_a_homepage/index.md | 8 +- .../learn/css/styling_text/web_fonts/index.md | 26 +- .../index.md | 18 +- .../how_to_structure_a_web_form/index.md | 124 ++-- .../learn/forms/other_form_controls/index.md | 2 +- .../index.md | 4 +- .../index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../css_basics/index.md | 52 +- .../dealing_with_files/index.md | 24 +- .../html_basics/index.md | 18 +- .../getting_started_with_the_web/index.md | 7 + .../javascript_basics/index.md | 98 +-- .../publishing_your_website/index.md | 6 +- .../advanced_text_formatting/index.md | 1 + .../debugging_html/index.md | 76 +-- .../getting_started/index.md | 26 +- .../marking_up_a_letter/index.md | 8 +- .../structuring_a_page_of_content/index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../test_your_skills_colon__links/index.md | 8 +- .../the_head_metadata_in_html/index.md | 28 +- .../index.md | 8 +- .../mozilla_splash_page/index.md | 8 +- .../responsive_images/index.md | 8 +- .../index.md | 8 +- .../en-us/learn/html/tables/advanced/index.md | 20 +- files/en-us/learn/html/tables/basics/index.md | 34 +- .../tables/structuring_planet_data/index.md | 8 +- files/en-us/learn/index.md | 20 +- .../asynchronous/introducing_workers/index.md | 2 +- .../javascript/asynchronous/promises/index.md | 2 +- .../sequencing_animations/index.md | 8 +- .../build_your_own_function/index.md | 176 ++--- .../building_blocks/events/index.md | 4 +- .../building_blocks/functions/index.md | 110 +-- .../building_blocks/image_gallery/index.md | 8 +- .../building_blocks/return_values/index.md | 74 +- .../index.md | 8 +- .../test_your_skills_colon__events/index.md | 8 +- .../index.md | 8 +- .../test_your_skills_colon__loops/index.md | 8 +- .../client-side_storage/index.md | 430 ++++++------ .../drawing_graphics/index.md | 500 +++++++------- .../manipulating_documents/index.md | 100 +-- .../third_party_apis/index.md | 96 +-- .../video_and_audio_apis/index.md | 256 +++---- .../first_steps/a_first_splash/index.md | 54 +- .../javascript/first_steps/arrays/index.md | 90 +-- .../javascript/first_steps/math/index.md | 56 +- .../silly_story_generator/index.md | 28 +- .../javascript/first_steps/strings/index.md | 72 +- .../test_your_skills_colon__arrays/index.md | 10 +- .../test_your_skills_colon__math/index.md | 8 +- .../test_your_skills_colon__strings/index.md | 14 +- .../index.md | 8 +- .../first_steps/what_went_wrong/index.md | 64 +- .../adding_bouncing_balls_features/index.md | 34 +- .../objects/object_building_practice/index.md | 18 +- .../test_your_skills_colon__json/index.md | 8 +- .../index.md | 8 +- .../index.md | 8 +- .../first_steps/getting_started/index.md | 2 +- files/en-us/learn/performance/css/index.md | 4 +- .../learn/performance/multimedia/index.md | 2 +- .../web_performance_basics/index.md | 1 - .../apache_configuration_htaccess/index.md | 21 +- .../server-side/django/admin_site/index.md | 2 +- .../server-side/django/deployment/index.md | 82 +-- .../django/development_environment/index.md | 15 +- .../django/django_assessment_blog/index.md | 46 +- .../learn/server-side/django/forms/index.md | 12 +- .../server-side/django/home_page/index.md | 2 +- .../django/skeleton_website/index.md | 18 +- .../express_nodejs/deployment/index.md | 62 +- .../development_environment/index.md | 178 ++--- .../displaying_data/author_list_page/index.md | 2 +- .../date_formatting_using_moment/index.md | 6 +- .../flow_control_using_async/index.md | 2 +- .../server-side/express_nodejs/forms/index.md | 2 +- .../express_nodejs/introduction/index.md | 46 +- .../express_nodejs/mongoose/index.md | 56 +- .../express_nodejs/skeleton_website/index.md | 34 +- .../client-server_overview/index.md | 2 +- .../first_steps/web_frameworks/index.md | 12 +- .../angular_getting_started/index.md | 4 +- .../ember_conditional_footer/index.md | 164 ++--- .../ember_getting_started/index.md | 68 +- .../ember_structure_componentization/index.md | 154 ++--- .../react_components/index.md | 2 +- .../react_interactivity_events_state/index.md | 2 +- .../react_todo_list_beginning/index.md | 4 +- .../svelte_components/index.md | 376 +++++----- .../svelte_deployment_next/index.md | 134 ++-- .../index.md | 536 +++++++-------- .../svelte_stores/index.md | 460 ++++++------- .../svelte_todo_list_beginning/index.md | 40 +- .../svelte_typescript/index.md | 586 ++++++++-------- .../svelte_variables_props/index.md | 388 +++++------ .../vue_conditional_rendering/index.md | 20 +- .../vue_first_component/index.md | 30 +- .../vue_getting_started/index.md | 28 +- .../vue_methods_events_models/index.md | 344 +++++----- .../vue_refs_focus_management/index.md | 12 +- .../vue_rendering_lists/index.md | 82 +-- .../accessibility/index.md | 18 +- .../automated_testing/index.md | 412 +++++------ .../feature_detection/index.md | 86 +-- .../html_and_css/index.md | 14 +- .../cross_browser_testing/javascript/index.md | 28 +- .../testing_strategies/index.md | 10 +- .../your_own_automation_environment/index.md | 642 +++++++++--------- .../deployment/index.md | 172 ++--- .../introducing_complete_toolchain/index.md | 186 ++--- .../overview/index.md | 10 +- 163 files changed, 4536 insertions(+), 4527 deletions(-) diff --git a/files/en-us/learn/accessibility/accessibility_troubleshooting/index.md b/files/en-us/learn/accessibility/accessibility_troubleshooting/index.md index e292253fd145fb7..0f5e51af3d4c5f5 100644 --- a/files/en-us/learn/accessibility/accessibility_troubleshooting/index.md +++ b/files/en-us/learn/accessibility/accessibility_troubleshooting/index.md @@ -99,10 +99,10 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for Accessibility troubleshooting". - - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - - A link to the actual task or assessment page, so we can find the question you want help with. + - A descriptive title such as "Assessment wanted for Accessibility troubleshooting". + - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. + - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. + - A link to the actual task or assessment page, so we can find the question you want help with. {{PreviousMenu("Learn/Accessibility/Mobile", "Learn/Accessibility")}} diff --git a/files/en-us/learn/accessibility/css_and_javascript/test_your_skills_colon__css_and_javascript_accessibility/index.md b/files/en-us/learn/accessibility/css_and_javascript/test_your_skills_colon__css_and_javascript_accessibility/index.md index 9000bcb8e6cd493..8a122afd048e6f1 100644 --- a/files/en-us/learn/accessibility/css_and_javascript/test_your_skills_colon__css_and_javascript_accessibility/index.md +++ b/files/en-us/learn/accessibility/css_and_javascript/test_your_skills_colon__css_and_javascript_accessibility/index.md @@ -70,7 +70,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for CSS accessibility 1 skill test". - - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - - A link to the actual task or assessment page, so we can find the question you want help with. + - A descriptive title such as "Assessment wanted for CSS accessibility 1 skill test". + - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. + - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. + - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/accessibility/html/index.md b/files/en-us/learn/accessibility/html/index.md index 70c43b3d5315434..838865aca26f15d 100644 --- a/files/en-us/learn/accessibility/html/index.md +++ b/files/en-us/learn/accessibility/html/index.md @@ -488,7 +488,7 @@ This highlights the importance of not only using meaningful file names in case s Note that the contents of the `alt` attribute should always provide a direct representation of the image and what it conveys visually. The alt should be brief and concise and include all the information conveyed in the image that is not duplicated in the surrounding text. -The content of the `alt` attribute for a single image differs based on the context. For example, if the photo of Fluffy is an avatar next to a review for Yuckymeat dog food, `alt="Fluffy"` is appropriate. If the photo is part of Fluffy's adoption page for the animal rescue society, information conveyed in the image that is relevant for a prospective dog parent that is not duplicated in the surrounding text should be included. A longer description, such as `alt="Fluffy, a tri-color terrier with very short hair, with a tennis ball in her mouth."` is appropriate. As the surrounding text likely has Fluffy's size and breed, that is not included in the `alt`. However, as the dog's biography likely doesn't include hair length, colors, or toy preferences, which the potential parent needs to know, it is included. Is the image outdoors, or does Fluffy have a red collar with a blue leash? Not important in terms of adopting the pet and therefore not included. All information image conveys that a sited user can access and is relevant to the context is what needs to be conveyed; nothing more. Keep it short, precise, and useful. +The content of the `alt` attribute for a single image differs based on the context. For example, if the photo of Fluffy is an avatar next to a review for Yuckymeat dog food, `alt="Fluffy"` is appropriate. If the photo is part of Fluffy's adoption page for the animal rescue society, information conveyed in the image that is relevant for a prospective dog parent that is not duplicated in the surrounding text should be included. A longer description, such as `alt="Fluffy, a tri-color terrier with very short hair, with a tennis ball in her mouth."` is appropriate. As the surrounding text likely has Fluffy's size and breed, that is not included in the `alt`. However, as the dog's biography likely doesn't include hair length, colors, or toy preferences, which the potential parent needs to know, it is included. Is the image outdoors, or does Fluffy have a red collar with a blue leash? Not important in terms of adopting the pet and therefore not included. All information image conveys that a sited user can access and is relevant to the context is what needs to be conveyed; nothing more. Keep it short, precise, and useful. Any personal knowledge or extra description shouldn't be included here, as it is not useful for people who have not seen the image before. If the ball is Fluffy's favorite toy or if the sited user can't know that from the image, then don't include it. diff --git a/files/en-us/learn/accessibility/mobile/index.md b/files/en-us/learn/accessibility/mobile/index.md index b3f89f6ae357e0a..4dd75faf2653f5e 100644 --- a/files/en-us/learn/accessibility/mobile/index.md +++ b/files/en-us/learn/accessibility/mobile/index.md @@ -114,9 +114,9 @@ For example, with TalkBack turned on: 2. Activate the URL bar. 3. Enter a web page that has a bunch of headings on it, such as the front page of bbc.co.uk. To enter the text of the URL: - - Select the URL bar by swiping left/right till you get to it, and then double-tapping. - - Hold your finger down on the virtual keyboard until you get the character you want, and then release your finger to type it. Repeat for each character. - - Once you've finished, find the Enter key and press it. + - Select the URL bar by swiping left/right till you get to it, and then double-tapping. + - Hold your finger down on the virtual keyboard until you get the character you want, and then release your finger to type it. Repeat for each character. + - Once you've finished, find the Enter key and press it. 4. Swipe left and right to move between different items on the page. 5. Swipe up and right with a smooth motion to enter the local content menu. @@ -155,8 +155,8 @@ When VoiceOver is turned on, you have a navigation feature called the Rotor avai 1. Twist two fingers around on the screen like you are turning a dial. Each option will be read aloud as you twist further around. You can go back and forth to cycle through the options. 2. Once you've found the option you want: - - Release your fingers to select it. - - If it is an option you can iterate the value of (such as Volume or Speaking Rate), you can do a swipe up or down to increase or decrease the value of the selected item. + - Release your fingers to select it. + - If it is an option you can iterate the value of (such as Volume or Speaking Rate), you can do a swipe up or down to increase or decrease the value of the selected item. The options available under the Rotor are context-sensitive — they will differ depending on what app or view you are in (see below for an example). @@ -168,20 +168,20 @@ Let's have a go at web browsing with VoiceOver: 2. Activate the URL bar. 3. Enter a web page that has a bunch of headings on it, such as the front page of bbc.co.uk. To enter the text of the URL: - - Select the URL bar by swiping left/right until you get to it, and then double-tapping. - - For each character, hold your finger down on the virtual keyboard until you get the character you want, and then release your finger to select it. Double-tap to type it. - - Once you've finished, find the Enter key and press it. + - Select the URL bar by swiping left/right until you get to it, and then double-tapping. + - For each character, hold your finger down on the virtual keyboard until you get the character you want, and then release your finger to select it. Double-tap to type it. + - Once you've finished, find the Enter key and press it. 4. Swipe left and right to move between items on the page. You can double-tap an item to select it (e.g., follow a link). 5. By default, the selected Rotor option will be Speaking Rate; you can currently swipe up and down to increase or decrease the speaking rate. 6. Now turn two fingers around the screen like a dial to show the rotor and move between its options. Here are a few examples of the options available: - - _Speaking Rate_: Change the speaking rate. - - _Containers_: Move between different semantic containers on the page. - - _Headings_: Move between headings on the page. - - _Links_: Move between links on the page. - - _Form Controls_: Move between form controls on the page. - - _Language_: Move between different translations, if they are available. + - _Speaking Rate_: Change the speaking rate. + - _Containers_: Move between different semantic containers on the page. + - _Headings_: Move between headings on the page. + - _Links_: Move between links on the page. + - _Form Controls_: Move between form controls on the page. + - _Language_: Move between different translations, if they are available. 7. Select _Headings_. Now you'll be able to swipe up and down to move between headings on the page. @@ -232,7 +232,7 @@ In particular, the most common problems that need to be addressed for mobile are - Suitability of layouts for mobile devices. A multi-column layout won't work as well on a narrow screen, for example, and the text size may need to be increased so it is legible. Such issues can be solved by creating a responsive layout using technologies such as [media queries](/en-US/docs/Web/CSS/Media_Queries), [viewport](/en-US/docs/Web/HTML/Viewport_meta_tag), and [flexbox](/en-US/docs/Learn/CSS/CSS_layout/Flexbox). - Conserving image sizes downloaded. In general, small screen devices won't need images that are as large as their desktop counterparts, and they are more likely to be on slow network connections. Therefore, it is wise to serve smaller images to narrow screen devices as appropriate. You can handle this using [responsive image techniques](/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images). -- Thinking about high resolutions. Many mobile devices have high-resolution screens, and therefore need higher-resolution images so that the display can continue to look crisp and sharp. Again, you can serve images as appropriate using responsive image techniques. In addition, many image requirements can be fulfilled using the SVG vector images format, which is well-supported across browsers today. SVG has a small file size and will stay sharp regardless of whatever size is being displayed (see [Adding vector graphics to the web](/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web) for more details). +- Thinking about high resolutions. Many mobile devices have high-resolution screens, and therefore need higher-resolution images so that the display can continue to look crisp and sharp. Again, you can serve images as appropriate using responsive image techniques. In addition, many image requirements can be fulfilled using the SVG vector images format, which is well-supported across browsers today. SVG has a small file size and will stay sharp regardless of whatever size is being displayed (see [Adding vector graphics to the web](/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web) for more details). > **Note:** We won't provide a full discussion of responsive design techniques here, as they are covered in other places around MDN (see above links). diff --git a/files/en-us/learn/accessibility/test_your_skills_colon__html_accessibility/index.md b/files/en-us/learn/accessibility/test_your_skills_colon__html_accessibility/index.md index a2a74c6316ace46..2de80d1f3e33d7c 100644 --- a/files/en-us/learn/accessibility/test_your_skills_colon__html_accessibility/index.md +++ b/files/en-us/learn/accessibility/test_your_skills_colon__html_accessibility/index.md @@ -87,7 +87,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for HTML accessibility 1 skill test". - - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - - A link to the actual task or assessment page, so we can find the question you want help with. + - A descriptive title such as "Assessment wanted for HTML accessibility 1 skill test". + - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. + - A link to the example you want assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. + - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/accessibility/wai-aria_basics/index.md b/files/en-us/learn/accessibility/wai-aria_basics/index.md index 01c400846d1bb16..93d1eb82896ecfd 100644 --- a/files/en-us/learn/accessibility/wai-aria_basics/index.md +++ b/files/en-us/learn/accessibility/wai-aria_basics/index.md @@ -287,25 +287,25 @@ We could go further with our ARIA usage, and provide some more validation help. 2. Open them both in a text editor and have a look at how the code works. 3. First of all, add a paragraph just above the opening `
` tag, like the one below, and mark both the form `