Skip to content

Add Accessibility and SEO Meta Tags Tests#20

Merged
LeandroPata merged 8 commits into
mainfrom
testing/improve-test-coverage
May 5, 2026
Merged

Add Accessibility and SEO Meta Tags Tests#20
LeandroPata merged 8 commits into
mainfrom
testing/improve-test-coverage

Conversation

@LeandroPata
Copy link
Copy Markdown
Owner

Add Accessibility and SEO Meta Tags Tests

Summary

This PR adds E2E tests for accessibility and SEO meta tags. Additionally, it updates the astro.config.mjs file to include Shiki syntax highlighting configuration.

Changes

  • Updated astro.config.mjs:

    • Added Shiki syntax highlighting configuration under the markdown section;
  • Updated global.css:

    • Added astro-code styles for both light and dark themes;
  • Created new E2E test files:

    • test/E2ETesting/a11y.spec.ts: Tests for accessibility using @axe-core/playwright;
    • test/E2ETesting/meta.spec.ts: Tests for SEO meta tags;
  • Added additional meta tags in Header.astro:

    • Added Open Graph tags;
    • Added alternate href for all available locales;
    • Added canonical tag and ensured that the <link rel="canonical"> tag dynamically updates based on the current page URL;
  • Fixed accessibility problems:

    • Added missing alt attributes in:
      • projects/en/wallTheme.md;
      • projects/pt/wallTheme.md;
      • projects/en/portfolio.md;
      • projects/pt/portfolio.md;
    • Added missing aria-label attributes in:
      • Skills.astro;
      • LanguageSelect.astro;
      • [lang]/about.astro;
    • Changed misaligned h5 content to h3 in [lang]/about.astro;
  • Updated i18n/utils.ts to include a function for getting all locales:

    • Added a function getAllLocales to return an array of all locale keys;
  • Updated dynamic routes in [lang]/projects/[...slug].astro:

    • Used the getAllLocales function to return an array of all locale keys;

Notes

The PR includes updates to the project's accessibility testing by leveraging @axe-core/playwright. This will help in identifying any potential issues related to web accessibility. Additionally, the tests ensure that all pages have the correct <meta> tags for SEO, including title, description, Open Graph tags, and canonical links.

@LeandroPata LeandroPata self-assigned this May 5, 2026
@LeandroPata LeandroPata merged commit 73f2a49 into main May 5, 2026
2 checks passed
@LeandroPata LeandroPata deleted the testing/improve-test-coverage branch May 5, 2026 18:04
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.

1 participant