Skip to content

inconsistent use of language selector icon & other SVG asset problems #300

Description

@DerekNonGeneric

I just took a peek at how the language picker icon is implemented on this site and strangely found it amongst the HTML+Liquid in _layouts/menu.html while all the other SVG assets are located in the assets/img directory. The files located in that directory also have problems. For example, the menu-down.svg icon strangely includes a line indicating that Apple owns the copyright to it (view source).

I also discovered that several other optimizations could significantly reduce the size of all these SVGs. Compare this to a manually optimized one i made a while ago for some other project: https://codepen.io/DerekNonGeneric/pen/bGroexG.

We can even take this a step further by minifying the assets and can probably make additional corrections in the process (viewbox of TC39 logo seems off) and we should probably ensure all are following a11y best practices (accessible SVGs).

Activity

  1. smorimoto commented on Apr 19, 2023

    @smorimoto
    Member

    I'm interested in improving around assets. It would be great to open a PR to lift us up to the first stage, but are you willing to do that? I'd love to see that.

  2. DerekNonGeneric commented on Apr 19, 2023

    @DerekNonGeneric
    ContributorAuthor

    Yeah, will get to it eventually (glad you agree) 😄

  3. 0xDevNinja commented on Apr 26, 2026

    @0xDevNinja
    Contributor

    Opened #661 which covers a focused subset of this issue:

    • Moves the inlined language-picker SVG out of _layouts/menu.html into assets/img/language.svg, referenced via <img> like the other icons.
    • Drops the stray <!-- Copyright © 2015 Apple Inc. All rights reserved. --> comment and redundant XML preamble from assets/img/menu-down.svg.

    Intentionally left for follow-up so this PR stays small and reviewable:

    • logo.svg viewBox — a visual inspection didn't reveal an obvious problem; happy to do a separate PR if someone can point at a concrete repro.
    • Deeper SVG optimization / minification of ecma-logo.svg and logo.svg.
    • Filling in navigation.language.title for non-Chinese locales' site.json so the new <img alt> (and the existing .menu-link__language-text span) get translated text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions