Skip to content

Improve logo alt text accessibility and simplify siteConfig destructuring#106

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/update-alt-text-for-logo
Draft

Improve logo alt text accessibility and simplify siteConfig destructuring#106
Copilot wants to merge 2 commits into
mainfrom
copilot/update-alt-text-for-logo

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 30, 2026

Two minor code quality issues in src/pages/index.js: the logo's alt text used an unclear abbreviation, and siteConfig was destructured unnecessarily when only title is consumed.

Changes

  • Accessibility: alt="Swob logo"alt="SMSWithoutBorders logo" — unambiguous for screen readers
  • Destructuring: Replaced const { siteConfig } = useDocusaurusContext() + siteConfig.title with direct destructure:
    const { siteConfig: { title } } = useDocusaurusContext();
    // ...
    <Layout title={title} ... />
Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"The alt text 'Swob logo' uses an abbreviation that may not be clear to screen reader users. Consider using the full name 'SMSWithoutBorders logo' to improve accessibility and clarity.","fixFiles":[{"filePath":"src/pages/index.js","diff":"diff --git a/src/pages/index.js b/src/pages/index.js\n--- a/src/pages/index.js\n+++ b/src/pages/index.js\n@@ -10,7 +10,7 @@\n   return (\n     <header className={styles.heroBanner}>\n       <div className={styles.heroInner}>\n-        <img src={SwobLogo} alt=\"Swob logo\" className={styles.heroLogo} height={90} width={90} />\n+        <img src={SwobLogo} alt=\"SMSWithoutBorders logo\" className={styles.heroLogo} height={90} width={90} />\n         <h1 className={styles.heroTitle}>\n           <Translate id=\"home.title\">SMSWithoutBorders Documentation</Translate>\n         </h1>\n"}]},{"message":"The `siteConfig` object is destructured but only `siteConfig.title` is used. Consider destructuring `title` directly from `siteConfig` for cleaner code: `const { siteConfig: { title } } = useDocusaurusContext();` or access it as `const context = useDocusaurusContext();` if more properties will be needed later.","fixFiles":[{"filePath":"src/pages/index.js","diff":"diff --git a/src/pages/index.js b/src/pages/index.js\n--- a/src/pages/index.js\n+++ b/src/pages/index.js\n@@ -76,9 +76,9 @@\n }\n \n export default function Home() {\n-  const { siteConfig } = useDocusaurusContext();\n+  const { siteConfig: { title } } = useDocusaurusContext();\n   return (\n-    <Layout title={siteConfig.title} description=\"RelaySMS Developer Documentation Portal\">\n+    <Layout title={title} description=\"RelaySMS Developer Documentation Portal\">\n       <HomepageHeader />\n     </Layout>\n   );\n"}]}]

Copilot AI changed the title [WIP] Improve accessibility of logo alt text Improve logo alt text accessibility and simplify siteConfig destructuring Apr 30, 2026
Copilot AI requested a review from PromiseFru April 30, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants