diff --git a/app/javascript/article-form/components/ClipboardButton.jsx b/app/javascript/article-form/components/ClipboardButton.jsx
index 464591173..bdc4e76f8 100644
--- a/app/javascript/article-form/components/ClipboardButton.jsx
+++ b/app/javascript/article-form/components/ClipboardButton.jsx
@@ -3,7 +3,9 @@ import PropTypes from 'prop-types';
import { Button } from '@crayons';
function linksToMarkdownForm(imageLinks) {
- return imageLinks.map((imageLink) => ``).join('\n');
+ return imageLinks
+ .map((imageLink) => ``)
+ .join('\n');
}
const CopyIcon = () => (
diff --git a/app/javascript/article-form/components/EditorBody.jsx b/app/javascript/article-form/components/EditorBody.jsx
index d5034baeb..fda776e10 100644
--- a/app/javascript/article-form/components/EditorBody.jsx
+++ b/app/javascript/article-form/components/EditorBody.jsx
@@ -19,11 +19,9 @@ function handleImageSuccess(textAreaRef) {
// Function is within the component to be able to access
// textarea ref.
const editableBodyElement = textAreaRef.current;
- const { links, image } = response;
- const altText = image[0]
- ? image[0].name.replace(/\.[^.]+$/, '')
- : 'alt text';
- const markdownImageLink = `\n`;
+ const { links } = response;
+
+ const markdownImageLink = `\n`;
const { selectionStart, selectionEnd, value } = editableBodyElement;
const before = value.substring(0, selectionStart);
const after = value.substring(selectionEnd, value.length);
diff --git a/app/javascript/utilities/markdown/markdownLintCustomRules.js b/app/javascript/utilities/markdown/markdownLintCustomRules.js
index 5bbd1686a..f1d1c565a 100644
--- a/app/javascript/utilities/markdown/markdownLintCustomRules.js
+++ b/app/javascript/utilities/markdown/markdownLintCustomRules.js
@@ -37,12 +37,12 @@ export const noDefaultAltTextRule = {
children.forEach((contentChild) => {
if (
contentChild.type === 'image' &&
- contentChild.line.toLowerCase().includes('![alt text]')
+ contentChild.line.toLowerCase().includes('![image description]')
) {
onError({
lineNumber: contentChild.lineNumber,
detail: '/p/editor_guide#alt-text-for-images',
- context: `Consider replacing the 'alt text' in square brackets at ${getImageTextString(
+ context: `Consider replacing the 'Image description' in square brackets at ${getImageTextString(
contentChild.line,
)} with a description of the image`,
});
diff --git a/app/views/pages/_editor_guide_text.html.erb b/app/views/pages/_editor_guide_text.html.erb
index ec69e3f16..1ec77df2a 100644
--- a/app/views/pages/_editor_guide_text.html.erb
+++ b/app/views/pages/_editor_guide_text.html.erb
@@ -74,7 +74,7 @@
When adding GIFs to posts and comments, please note that there is a limit of 200 megapixels per frame/page.
+

figcaption tag!Some users might not be able to see or easily process images that you use in your posts. Providing an alternative description for an image helps make sure that everyone can understand your post, whether they can see the image or not.
When you upload an image in the editor, you will see the following text to copy and paste into your post:
--
Replace the "Alt Text" in square brackets with a description of your image - for example:
++
Replace the "Image description" in square brackets with a description of your image - for example:

By doing this, if someone reads your post using an assistive device like a screen reader (which turns written content into spoken audio) they will hear the description you entered.
diff --git a/app/views/pages/_editor_markdown_help.html.erb b/app/views/pages/_editor_markdown_help.html.erb index e7ba60916..5749d6a97 100644 --- a/app/views/pages/_editor_markdown_help.html.erb +++ b/app/views/pages/_editor_markdown_help.html.erb @@ -24,7 +24,7 @@ When adding GIFs to posts and comments, please note that there is a limit of 200 megapixels per frame/page.
- +

figcaption tag!
- 
+ 