Skip to content

Adds the Clarity theme files#1

Open
ajrbyers wants to merge 6 commits intomainfrom
initial
Open

Adds the Clarity theme files#1
ajrbyers wants to merge 6 commits intomainfrom
initial

Conversation

@ajrbyers
Copy link
Member

@ajrbyers ajrbyers commented Mar 5, 2026

See readme.

@ajrbyers ajrbyers assigned mauromsl and unassigned mauromsl Mar 9, 2026
@ajrbyers ajrbyers requested review from joemull March 10, 2026 11:12
@ajrbyers ajrbyers assigned joemull and unassigned joemull Mar 10, 2026
@StephDriver
Copy link
Member

I ran axe across clarity. There were very few warnings most of which I know are not theme specific but here are the ones that might be worth checking:

  1. Target Size too small (WCAG 2.5.8)
    article page footnotes and cross references are coming up as too small - but I remember working on this, so it may be a change that is on the main repo and didn't come across. needs investigating.

  2. Colour contrast
    News item page, the news tags colour contrast is just failing (4.49:1 instead of 4.5:1)
    e.g
    <a href="/olh/news/tag/Digital%20Humanities/" class="badge badge-secondary badge-pill ">

  3. Press home page does not have an H1.

Copy link
Member

@joemull joemull left a comment

Choose a reason for hiding this comment

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

There are some really great things here:

  1. one theme across journal, press, and repository
  2. higher accessibility conformance than any theme so far
  3. more organized CSS than any theme, potentially allowing us to do easier journal setups and color customization
  4. use of bootstrap

Haven't finished reviewing everything I want to, but as I will be out for a few days, I am returning this with some comments.

In case you are curious, here is my to do list when I get back:

  • Finish reading over CSS
  • Experiment with dark mode
  • Test most pages on mobile on a few OLH journals
  • Test most pages at press level
  • Test pages in repository system
  • Check if there is a theme that provides a light header, so that current Material journals can switch easily
  • Create GH issue for changes made to 1.8 since d25d0bfa5
  • Create GH issue for changes made to master since 891066d8

Copy link
Member

@joemull joemull Mar 16, 2026

Choose a reason for hiding this comment

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

Would you mind if we ran prettier over the HTML as a last step? This is a rare opportunity to make our HTML more readable!

Steps to do so are now quite straightforward, even though there is mustache syntax in these files. There is a plugin you can use with prettier now that was made for Jinja but works for Django templates as well.

  1. Install bun
  2. Create a package.json with this:
    {
      "dependencies": {
        "prettier": "^3.6.2",
        "prettier-plugin-jinja-template": "^2.1.0",
        "prettier-plugin-toml": "^2.0.6"
      }
    }
  3. Create a .prettier.toml with this:
    plugins = ["prettier-plugin-jinja-template", "prettier-plugin-toml"]
    
    [[overrides]]
    files = ["*.jinja"]
    options.parser = "jinja-template"
  4. Run bun install
  5. Run bun prettier --check templates and fix HTML syntax errors until there aren't any more
  6. Run bun prettier --write templates a few times until it makes no further changes
  7. Consider running it on the CSS as well, though it is already quite nicely formatted.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm open to running this once we're done.

@joemull joemull assigned ajrbyers and unassigned joemull Mar 16, 2026
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.

4 participants