Skip to content

Conversation

yasulab
Copy link
Member

@yasulab yasulab commented Sep 2, 2025

生成された HTML の静的解析テスト ($ bundle exec rake test) を実行し、出てきたエラーを修正しました! 🛠💨✨

Before

※ クリックするとテスト結果レポートの詳細が表示されます。

$ bundle exec rake test
$ bundle exec rake test

...


Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.174 seconds.

Auto-regeneration: disabled. Use --watch to enable.
Running 5 checks (Favicon, Images, Links, OpenGraph, Scripts) in ["_site"] on *.html files ...


Checking 21 internal links
Checking internal link hashes in 1 file
Ran on 18 files!


For the Images check, the following failures were found:

* At _site/events/index.html:168:

  image /img/events/saikyo-coderdojo.webp does not have an alt attribute

* At _site/events/index.html:197:

  image /img/contests/cover.webp does not have an alt attribute

* At _site/index.html:201:

  image /img/top/about-coderdojo/coderdojo-logo-transparent.webp does not have an alt attribute

* At _site/index.html:220:

  image /img/top/about-coderdojo/coderdojo-logo-transparent.webp does not have an alt attribute

* At _site/index.html:221:

  image /img/top/about-coderdojo/dojocon.webp does not have an alt attribute

* At _site/index.html:226:

  image /img/top/about-coderdojo/dojocon.webp does not have an alt attribute

* At _site/index.html:255:

  image /img/top/inspire-next/exhibit.webp does not have an alt attribute

* At _site/index.html:257:

  image /img/top/inspire-next/fire-transparent.webp does not have an alt attribute

* At _site/index.html:266:

  image /img/top/inspire-next/fire-transparent.webp does not have an alt attribute

* At _site/index.html:284:

  image /img/top/inspire-next/exhibit.webp does not have an alt attribute

* At _site/index.html:360:

  image /img/top/background1.webp does not have an alt attribute

* At _site/index.html:429:

  image /img/top/background2.webp does not have an alt attribute

* At _site/index.html:471:

  image /img/top/background3.webp does not have an alt attribute

* At _site/index.html:603:

  image /img/top/background4.webp does not have an alt attribute

* At _site/index.html:619:

  image /img/top/background5.webp does not have an alt attribute

* At _site/sessions/keynote1/index.html:154:

  image /img/sessions/profile/miyajima-kirie.webp does not have an alt attribute

* At _site/sessions/keynote2/index.html:154:

  image /img/sessions/profile/komiyama-rieko.webp does not have an alt attribute


HTML-Proofer found 17 failures!

After

$ bundle exec rake test

...

Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.172 seconds.

Auto-regeneration: disabled. Use --watch to enable.
Running 5 checks (Favicon, Images, Links, OpenGraph, Scripts) in ["_site"] on *.html files ...

Checking 21 internal links
Checking internal link hashes in 1 file
Ran on 18 files!

HTML-Proofer finished successfully.

TIPS

.github/workflows/test.yml にある以下のコメントアウトを解除すると、CI 上で自動的に検知できるようになります。ただ迅速にデプロイしたい場面もあると思うので(その場合は静的解析テストが重荷になることもあるので)今回のように不定期に手動で実行して、結果を確認しても良さそうです 💭

    - name: 🔧 Build & Test
      run: |
        ...
        # SKIP_BUILD=true       bundle exec rake test
        # NOTE: サイトが仕上がったら、上記テストを走らせると自動検知できる。
        #       ただ初期は自動検知の通知が多すぎるので手動で実行するのが吉。
        ...

@yasulab yasulab changed the title Add missing alt attributes for images to make CI pass Add missing alt attributes for images to make rake test pass Sep 2, 2025
@mucho613 mucho613 self-requested a review September 2, 2025 04:04
Copy link
Collaborator

@mucho613 mucho613 left a comment

Choose a reason for hiding this comment

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

ありがとうございます! LGTM 👍️

@yasulab yasulab merged commit c554734 into main Sep 2, 2025
2 checks passed
@yasulab yasulab deleted the make-test-suites-pass branch September 2, 2025 04:06
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