Skip to content

Replaced h1 element with service name#2018

Merged
osma merged 2 commits intomainfrom
issue1976-accessible-service-name
Apr 23, 2026
Merged

Replaced h1 element with service name#2018
osma merged 2 commits intomainfrom
issue1976-accessible-service-name

Conversation

@Vainonen
Copy link
Copy Markdown
Contributor

@Vainonen Vainonen commented Apr 23, 2026

Reasons for creating this PR

Screen reader reads hidden h1 element which has "Skosmos" in it. Also welcome text should not be visible with mobile view.

Link to relevant issue(s), if any

Description of the changes in this PR

h1 element has now long service name defined in config file. If the language version of name is missing it falls back to shorter name in config file, which does not have language version. If shorter name is missing, it falls back to "Skosmos".

Custom template for landing-end has been modified with Bootstrap calls to hide the welcome text from mobile view.

Known problems or uncertainties in this PR

According to Hahmo layout, Finto front page should have mobile navigation bar which opens a page with welcome text in it. This navigation bar is not implement yet.

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.07%. Comparing base (17083ca) to head (5ff76a7).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2018   +/-   ##
=========================================
  Coverage     70.07%   70.07%           
  Complexity     1703     1703           
=========================================
  Files            34       34           
  Lines          4484     4484           
=========================================
  Hits           3142     3142           
  Misses         1342     1342           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vainonen Vainonen requested a review from osma April 23, 2026 08:32
@osma osma added this to the 3.3 milestone Apr 23, 2026
@osma osma moved this to Under review in Skosmos 3.x Backlog Apr 23, 2026
Copy link
Copy Markdown
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

There is a syntax error in the closing tag (you can simply apply my suggested fix), otherwise this looks OK and works fine.

This is an improvement for sure, but I don't think it covers the whole issue. I think we should still either leave the issue open or close it and open a follow-up issue about the HTML DOM order, which is still problematic for both screen reader and mobile users. I think it should be possible to change the DOM order while preserving the visual layout for sighted users (with the welcome box in the right column) if we use CSS Grid for the layout. Here is a minimal example of how it could work:

<html>

<head>
<style>
.landing-layout {
  display: grid;
  grid-template-columns: 1fr; /* mobile: single column */
  gap: 1.5rem;
}

/* Desktop layout: 2 columns (8/4 split) */
@media (min-width: 768px) {
  .landing-layout {
    grid-template-columns: 2fr 1fr; /* left: 66.7%, right: 33.3% */
    grid-template-areas:
      "vocab welcome"
      "vocab news";
  }

  .box-vocab {
    grid-area: vocab;
  }

  .box-welcome {
    grid-area: welcome;
  }

  .box-news {
    grid-area: news;
  }
}


</style>

<body>

<div class="container">
  <div class="landing-layout">
    <!-- 1. Welcome (top-right visually, first in DOM) -->
    <section class="box box-welcome">
      <h2>Welcome to Finto</h2>
      <p>...</p>
    </section>

    <!-- 2. List of vocabularies (left column, second in DOM) -->
    <section class="box box-vocab">
      <h2>Vocabularies</h2>
      <ul>...</ul>
    </section>

    <!-- 3. News (top-right visually, below welcome, third in DOM) -->
    <section class="box box-news">
      <h3>News</h3>
      <ul>...</ul>
    </section>
  </div>
</div>
</body>
</html>

Comment thread src/view/base-template.twig Outdated
@osma osma merged commit da71b3b into main Apr 23, 2026
24 of 26 checks passed
@osma osma deleted the issue1976-accessible-service-name branch April 23, 2026 11:03
@github-project-automation github-project-automation Bot moved this from Under review to Issue/PR closed in Skosmos 3.x Backlog Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Issue/PR closed

Development

Successfully merging this pull request may close these issues.

2 participants