Skip to content

migrate: 親和力(accessibility)章節#70

Merged
tony140407 merged 9 commits intomainfrom
migrate/accessibility
Mar 19, 2026
Merged

migrate: 親和力(accessibility)章節#70
tony140407 merged 9 commits intomainfrom
migrate/accessibility

Conversation

@tony140407
Copy link
Copy Markdown
Contributor

內容

  • 親和力工具介紹頁
  • Demo page:首頁範本、意見回饋頁範本(4 步驟表單流程)

遷移調整

  • 移除 demo-page layout,改用 layout: raw 搭配 demo-page-head / demo-page-foot shortcode,使 code-example 能展示完整 HTML 文件結構(含 <!DOCTYPE><head><body>
  • 新增 breadcrumb-step partial/shortcode,對應 Jekyll 版 _includes/demo-page/breadcrumb-step.html
  • Jekyll/Liquid 程式碼範例改寫為 Hugo/Go template 語法
  • 所有 demo page 內部連結改用 absURL / relURL shortcode,確保部署至子路徑環境能正常運作

IK-Ngoo and others added 7 commits March 16, 2026 11:11
Add accessibility landing page, a11y tools documentation, and demo pages
(landing page + 4-step form flow). Includes demo-page layout and
warning-block partial.

Original commits on tmp/0726: 6685aed, c029ebb, b2d8328, bf2d6da,
c5da18d, a0721f9, 94b3d23, 885b986, ffb32d8, 2e3ac19
code-example shortcode 透過 Hugo 的 .Content 取得頁面內容時,
只能取得 front matter 以下的內容區塊,無法包含 layout 提供的
HTML 外殼,導致原始碼展示缺少完整的 HTML 文件結構。

移除 demo-page layout,改用 layout: raw 搭配 shortcode:
- 新增 demo-page-head / demo-page-foot shortcode 提供 HTML 外殼
- 新增 breadcrumb-step partial/shortcode(對應 Jekyll 版本)
- 5 個 demo page 改用上述 shortcode,code-example 能正確顯示完整原始碼
demo-page 頁面的「元件客製化調整」章節原本以 Jekyll 框架搭配
Liquid 模板語法作為 breadcrumb 元件的應用範例,遷移至 Hugo 後
改寫為等效的 Hugo Go template 語法範例,並修正 aria-current
屬性及 href 路徑以符合實際 partial 實作。
form-page-s3 引用 /assets/mt-scode.png 但該檔案未從 Jekyll
搬到 Hugo,放入 static/assets/ 使路徑對應。
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取請求引入了全新的「親和力」章節,旨在提供全面的網頁親和力資源和示範頁面。它重構了示範頁面的渲染方式,使其能夠展示完整的 HTML 結構,並更新了內部連結機制,以提高部署的靈活性。

Highlights

  • 新增「親和力」章節: 引入了全新的「親和力」章節,包含親和力工具介紹頁及示範頁面,旨在提供全面的網頁親和力資源。
  • 示範頁面渲染重構: 移除了 demo-page 版面配置,改用 layout: raw 搭配 demo-page-head / demo-page-foot shortcode,以展示完整的 HTML 文件結構(含 <!DOCTYPE><head><body>)。
  • 新增 breadcrumb-step 元件: 引入了 breadcrumb-step partial/shortcode,用於在示範頁面中生成步驟導覽列,對應 Jekyll 版的 _includes/demo-page/breadcrumb-step.html
  • 程式碼範例語法遷移: 將原有的 Jekyll/Liquid 程式碼範例改寫為 Hugo/Go template 語法,以適應新的框架。
  • 內部連結機制優化: 示範頁面中的所有內部連結改用 absURL / relURL shortcode,確保部署至子路徑環境時能正常運作。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .prettierignore
    • 新增 content/ 至忽略清單。
  • content/accessibility/_index.md
    • 新增頁面,介紹「親和力」概念,區分其與「無障礙」的不同,並概述示範頁面範例(首頁、意見回饋頁)及 WAI-ARIA 考量。
  • content/accessibility/a11y_tools/_index.md
    • 新增頁面,詳細列出親和力檢測工具,依類型分類(WAI 清單、通用工具、設計工具、持續設計、Git Hooks、Linter、單元測試、驗收測試、效能測試)。
  • content/accessibility/demo-page/_index.md
    • 新增頁面,作為親和力示範模板的索引,包含生產環境使用的注意事項,並詳細解釋首頁和意見回饋頁模板的元件使用與客製化。
  • content/accessibility/demo-page/form-page-s1.html
    • 新增意見回饋表單第一步(同意聲明)的 HTML 示範頁面。
  • content/accessibility/demo-page/form-page-s2.html
    • 新增意見回饋表單第二步(意見填寫)的 HTML 示範頁面。
  • content/accessibility/demo-page/form-page-s3.html
    • 新增意見回饋表單第三步(最終確認與驗證碼)的 HTML 示範頁面。
  • content/accessibility/demo-page/form-page-s4.html
    • 新增意見回饋表單第四步(送出結果)的 HTML 示範頁面。
  • content/accessibility/demo-page/landing-page.html
    • 新增可訪問的首頁 HTML 示範頁面。
  • content/components/_index.md
    • 更新了頁面的 weight 屬性。
  • content/technology/_index.md
    • 更新了頁面的 weight 屬性。
  • content/visual/_index.md
    • 更新了頁面的 weight 屬性。
  • layouts/_partials/demo-page/breadcrumb-step.html
    • 新增用於在示範頁面中渲染麵包屑步驟的 partial。
  • layouts/_partials/demo-page/warning-block.html
    • 新增用於在示範頁面中顯示警告訊息的 partial。
  • layouts/_shortcodes/breadcrumb-step.html
    • 新增 breadcrumb-step shortcode 以整合 breadcrumb-step partial。
  • layouts/_shortcodes/demo-page-foot.html
    • 新增示範頁面頁尾的 shortcode,包含字體連結。
  • layouts/_shortcodes/demo-page-head.html
    • 新增示範頁面頁首的 shortcode,包含基本 HTML 結構、CSS、favicon 和 meta 標籤。
  • layouts/home.html
    • 修改了首頁佈局,將「accessibility」區塊從主要內容顯示中排除。
Activity
  • 目前沒有人類活動的紀錄。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

這次的 Pull Request 主要是遷移「親和力(accessibility)」章節,包含了新的文件和示範頁面。整體結構良好,善用 Hugo 的 shortcodes 和 partials 建立了可重用的示範頁面元件,並遵循了漸進式增強的原則。本次審查發現了幾個問題,包含一個失效的跳轉連結、一個遺失的表單欄位屬性,以及一些可以讓程式碼更簡潔並遵循最佳實踐的機會(例如:避免使用行內樣式、移除過時的註解、改善程式碼排版等)。

@tony140407 tony140407 force-pushed the migrate/accessibility branch 2 times, most recently from 14f0010 to 69e0165 Compare March 17, 2026 07:04
@tony140407 tony140407 force-pushed the migrate/accessibility branch from 8814cc5 to d098e53 Compare March 17, 2026 09:44
@nonumpa nonumpa requested a review from ross-nics March 18, 2026 03:45
Copy link
Copy Markdown
Contributor

@nonumpa nonumpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tony140407 tony140407 merged commit 30c0b3a into main Mar 19, 2026
7 checks passed
@nonumpa nonumpa deleted the migrate/accessibility branch March 24, 2026 10:33
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.

3 participants