Skip to content

Use a geometric shape for the menu symbol (rather than the Taoist Bagua trigram for Heaven) #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 12, 2021

Conversation

gibson042
Copy link
Contributor

@gibson042 gibson042 commented Nov 5, 2020

I'm a little on the fence about this one, but it seems wrong to use U+2630 TRIGRAM FOR HEAVEN for representing a menu because the glyph happens to look approximately as desired. This geometric symbol (U+25A4 SQUARE WITH HORIZONTAL FILL) is the best substitute I could find in Unicode, but alternatively we could just use an SVG.

Before After
screen-before screen

@ljharb
Copy link
Member

ljharb commented Nov 5, 2020

Why does it seem wrong? The ☰ icon is a very widely used icon to indicate a menu, and the origin of a glyph is only relevant if people think of that when they see it, and are confused or offended. Is either of those a concrete complaint here?

@gibson042
Copy link
Contributor Author

It's at least poor form to (ab)use a code point because the associated glyph has convenient characteristics, and generally troublesome for people using a screen reader (although I do not know for certain that such is the case here). Unicode is clear about "character" corresponding with abstract meaning rather than shape.

@gibson042 gibson042 changed the title Use a geometric shape for the menu symbol (rather than a Taoist Bagua trigram) Use a geometric shape for the menu symbol (rather than the Taoist Bagua trigram for Heaven) Nov 6, 2020
@bakkot
Copy link
Contributor

bakkot commented Nov 7, 2020

I agree the current thing is an abuse of Unicode, though I think it's kind of a shame they haven't officially blessed this usage (or given "hamburger menu" its own code point).

Concretely, I'd be happier with an SVG or faking it with CSS rather than . Here's a dead simple SVG I just wrote by hand (I am not an expert):

<svg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'><path stroke='rgba(0, 0, 0, 1)' stroke-width='3' stroke-linecap='round' d='M4 7H26M4 15H26M4 23H26'/></svg>

or as a data URI:

data:image/svg+xml;charset=utf8,<svg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'><path stroke='rgba(0, 0, 0, 1)' stroke-width='3' stroke-linecap='round' d='M4 7H26M4 15H26M4 23H26'/></svg>

@gibson042
Copy link
Contributor Author

I was reminded of this by the ecmarkup preview in Matrix. Should it land using U+25A4 SQUARE WITH HORIZONTAL FILL, or switch to SVG? And either way, I'm now also thinking about a followup that leverages ARIA like https://www.w3.org/TR/wai-aria-practices/#menu and/or https://til.simonwillison.net/javascript/dropdown-menu-with-details-summary .

@bakkot
Copy link
Contributor

bakkot commented Sep 9, 2021

Let's use an SVG. I'm fine with the one I suggested above if you don't want to come up with a new one, but I'm not attached to it if you have something you'd prefer.

Re: ARAI, there's definitely room for improvement, and I'd be happy to review such a PR (though I currently lack the knowledge to write one).

@gibson042 gibson042 force-pushed the 2020-11-menu-character branch from 07c8744 to c1baeb4 Compare September 9, 2021 19:13
@gibson042
Copy link
Contributor Author

Let's use an SVG.

Done.

Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

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

LGTM other than the stroke thing. Thanks for following up, and sorry for letting this sit so long.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Kevin Gibbons <bakkot@gmail.com>
@gibson042
Copy link
Contributor Author

Thanks for following up, and sorry for letting this sit so long.

Not at all, the fault was mine.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@bakkot bakkot merged commit a5d99c0 into tc39:master Sep 12, 2021
bakkot pushed a commit that referenced this pull request Sep 12, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…ua trigram for Heaven) (#265)
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.

None yet

3 participants