Use a unitless width on the footer logos in the page-footer snippet

Open Beginner friendly
#214 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
html, markdown, yaml
Domain
documentation

Research direction

Open README.md at line 96 and example/_quarto.yml at line 66; both contain the footer logo <img> tags with width="65px". Change the attribute to width="65" in both files, then add a changelog.md entry telling site owners to make the same edit in their own _quarto.yml. Done when the footer snippet uses the unitless value and a built page passes the W3C validator without a width-attribute error.

Written by the indexing model from the issue text.

Description

accessibility bug

Problem

The footer logo snippet in this repo uses width="65px". The HTML width attribute accepts only a whole number, with no unit. The W3C validator reports this as an error on the docs.posit.co homepage.

Product sites copy this snippet into the page-footer in their _quarto.yml, so the error is on every page that uses the footer.

The snippet is in two places:

  • README.md:96
  • example/_quarto.yml:66

Fix

  1. Change width="65px" to width="65" in both files:

    <img src="/images/posit-logos-2024_horiz-full-color.svg" alt="Posit" width="65" class="light-content posit-footer-logo"><img src="/images/posit-logo-fullcolor-TM.svg" alt="Posit" width="65" class="dark-content posit-footer-logo">
    
  2. Add an entry to changelog.md that tells site owners to make the same change in their own _quarto.yml. The theme can't fix the copies in each site.

Out of scope

An external SEO audit reported other validator errors at the same time. These come from Quarto, not from this theme, so this repo can't fix them:

  • Duplicate id="quarto-text-highlighting-styles" and id="quarto-bootstrap" on the light, dark, and extra stylesheet <link> elements
  • append-hash="true" on <link>, which is not a valid attribute
  • role="menu" on the navbar toggler <button>
  • Empty id="" on some sidebar <ul class="sidebar-section"> elements (for example, on /connect/admin/ and /rspm/admin/, but not on the homepage). Quarto creates these from each site's sidebar: config. This theme doesn't override the sidebar partial.

The first three are on the live site with Quarto 1.10.18, and the empty sidebar IDs are on the live site with Quarto 1.11.7. If they are still in the current Quarto release, report them to quarto-dev/quarto-cli.

How to verify

Run the W3C validator on a built page. It should not report errors for the footer <img> width attribute.

Dominant language
SCSS
Stars
6
Forks
5
Avg merge
8h 10m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/product-doc-theme

All issues in posit-dev/product-doc-theme

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.