Skip to content

userTooltip and popoverMenu components#29

Open
khamer wants to merge 6 commits into
mainfrom
popover-components
Open

userTooltip and popoverMenu components#29
khamer wants to merge 6 commits into
mainfrom
popover-components

Conversation

@khamer
Copy link
Copy Markdown
Member

@khamer khamer commented May 15, 2026

Two new components, pulled back from a recent client project. Both are HTML/CSS only.


@khamer khamer requested a review from Copilot May 15, 2026 18:24
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for imarc-pronto ready!

Name Link
🔨 Latest commit 27aae80
🔍 Latest deploy log https://app.netlify.com/projects/imarc-pronto/deploys/6a1f0104a78b5200089911f3
😎 Deploy Preview https://deploy-preview-29--imarc-pronto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds two HTML/CSS-only UI components for displaying user details and compact action menus, plus supporting style exports and a danger color alias.

Changes:

  • Adds userTooltip atom demo and styles using the native Popover API.
  • Adds popoverMenu molecule demo and styles using popover/anchor positioning.
  • Exports the new components and adds small circular button sizing plus .danger color utility support.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
resources/styles/utilities/colors/index.scss Adds .danger as an alias for error accent colors.
resources/styles/molecules/popoverMenu/popoverMenu.html Adds demo markup for end/start aligned popover menus.
resources/styles/molecules/popoverMenu/index.scss Adds popover menu panel/list/action styles.
resources/styles/molecules/index.scss Forwards the new popover menu molecule.
resources/styles/atoms/userTooltip/userTooltip.html Adds demo markup for user detail popovers.
resources/styles/atoms/userTooltip/index.scss Adds user tooltip/avatar/card styles.
resources/styles/atoms/index.scss Forwards the new user tooltip atom.
resources/styles/atoms/button/index.scss Adds a small size modifier for circle/square buttons.
Comments suppressed due to low confidence (7)

resources/styles/molecules/popoverMenu/popoverMenu.html:39

  • This second example repeats the ARIA menu pattern without menuitem roles or menu keyboard behavior. Because role="menu" changes the expected semantics, the actions should either implement the ARIA menu pattern fully or remain ordinary list/buttons without menu roles.
            <button type="button" class="popoverMenu__trigger button -circle -small -ghost" popovertarget="demo-popover-2" aria-controls="demo-popover-2" aria-haspopup="menu" aria-label="Open menu" style="anchor-name: --demo-popover-2">
                <svg class="button__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512" aria-hidden="true">
                    <path d="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z" />
                </svg>
            </button>
            <div id="demo-popover-2" class="popoverMenu__panel -startAligned" popover="auto">
                <ul class="popoverMenu__list" role="menu">

resources/styles/atoms/userTooltip/userTooltip.html:23

  • This trigger also declares a dialog popup while the referenced popover has no dialog semantics. Keeping aria-haspopup="dialog" here can mislead assistive technology unless the panel is exposed as a named dialog.
        <button type="button" class="userTooltip__trigger button -circle -small accent-secondary" popovertarget="demo-user-tooltip-2" aria-controls="demo-user-tooltip-2" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-2">
          M
        </button>
        <div id="demo-user-tooltip-2" class="userTooltip__panel" popover="auto">

resources/styles/atoms/userTooltip/userTooltip.html:39

  • This trigger advertises a dialog popup, but the target remains a generic popover div. Align the ARIA with the actual semantics so screen reader users are not told to expect a dialog where none is exposed.
        <button type="button" class="userTooltip__trigger button -circle -small accent-tertiary" popovertarget="demo-user-tooltip-3" aria-controls="demo-user-tooltip-3" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-3">
          K
        </button>
        <div id="demo-user-tooltip-3" class="userTooltip__panel" popover="auto">

resources/styles/atoms/userTooltip/userTooltip.html:23

  • This wrapper repeats the invalid span containing a block-level div panel pattern. A flow-content wrapper should be used so the component markup remains valid.
    <span class="userTooltip">
        <button type="button" class="userTooltip__trigger button -circle -small accent-secondary" popovertarget="demo-user-tooltip-2" aria-controls="demo-user-tooltip-2" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-2">
          M
        </button>
        <div id="demo-user-tooltip-2" class="userTooltip__panel" popover="auto">

resources/styles/atoms/userTooltip/userTooltip.html:39

  • This span also contains the block-level popover panel, which is invalid HTML. Use a div or another flow-content wrapper for the component container.
    <span class="userTooltip">
        <button type="button" class="userTooltip__trigger button -circle -small accent-tertiary" popovertarget="demo-user-tooltip-3" aria-controls="demo-user-tooltip-3" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-3">
          K
        </button>
        <div id="demo-user-tooltip-3" class="userTooltip__panel" popover="auto">

resources/styles/atoms/userTooltip/userTooltip.html:22

  • The accessible name for this trigger is just "M", which is ambiguous when several user tooltip buttons are present. It should include the user's name or a clear action label.
        <button type="button" class="userTooltip__trigger button -circle -small accent-secondary" popovertarget="demo-user-tooltip-2" aria-controls="demo-user-tooltip-2" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-2">
          M
        </button>

resources/styles/atoms/userTooltip/userTooltip.html:38

  • This trigger is announced only by the initial "K", which is not descriptive enough to tell users which profile/details will open. Provide a full accessible label for the user tooltip button.
        <button type="button" class="userTooltip__trigger button -circle -small accent-tertiary" popovertarget="demo-user-tooltip-3" aria-controls="demo-user-tooltip-3" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-3">
          K
        </button>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +12
<button type="button" class="popoverMenu__trigger button -circle -small -ghost" popovertarget="demo-popover-1" aria-controls="demo-popover-1" aria-haspopup="menu" aria-label="Open menu" style="anchor-name: --demo-popover-1">
<svg class="button__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512" aria-hidden="true">
<path d="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z" />
</svg>
</button>
<div id="demo-popover-1" class="popoverMenu__panel -endAligned" popover="auto">
<ul class="popoverMenu__list" role="menu">
Comment on lines +4 to +7
<button type="button" class="userTooltip__trigger button -circle -small" popovertarget="demo-user-tooltip-1" aria-controls="demo-user-tooltip-1" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-1">
J
</button>
<div id="demo-user-tooltip-1" class="userTooltip__panel" popover="auto">
Comment on lines +3 to +7
<span class="userTooltip">
<button type="button" class="userTooltip__trigger button -circle -small" popovertarget="demo-user-tooltip-1" aria-controls="demo-user-tooltip-1" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-1">
J
</button>
<div id="demo-user-tooltip-1" class="userTooltip__panel" popover="auto">
Comment on lines +4 to +6
<button type="button" class="userTooltip__trigger button -circle -small" popovertarget="demo-user-tooltip-1" aria-controls="demo-user-tooltip-1" aria-haspopup="dialog" style="anchor-name: --demo-user-tooltip-1">
J
</button>
Comment thread resources/styles/molecules/popoverMenu/index.scss Outdated
Comment on lines +85 to +88
&[disabled],
&.-disabled {
color: var(--root-background-color-inactive);
cursor: initial;
khamer and others added 3 commits May 15, 2026 15:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

<path d="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z" />
</svg>
</button>
<div id="demo-popover-1" class="popoverMenu__panel -endAligned" popover="auto">
<path d="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z" />
</svg>
</button>
<div id="demo-popover-2" class="popoverMenu__panel -startAligned" popover="auto">
<button type="button" class="userTooltip__trigger button -circle -small" popovertarget="demo-user-tooltip-1" aria-controls="demo-user-tooltip-1" aria-label="View Jane Smith's profile" style="anchor-name: --demo-user-tooltip-1">
<span aria-hidden="true">J</span>
</button>
<div id="demo-user-tooltip-1" class="userTooltip__panel" popover="auto">
<button type="button" class="userTooltip__trigger button -circle -small accent-secondary" popovertarget="demo-user-tooltip-2" aria-controls="demo-user-tooltip-2" aria-label="View Marcus Johnson's profile" style="anchor-name: --demo-user-tooltip-2">
<span aria-hidden="true">M</span>
</button>
<div id="demo-user-tooltip-2" class="userTooltip__panel" popover="auto">
<button type="button" class="userTooltip__trigger button -circle -small accent-tertiary" popovertarget="demo-user-tooltip-3" aria-controls="demo-user-tooltip-3" aria-label="View Kevin Hamer's profile" style="anchor-name: --demo-user-tooltip-3">
<span aria-hidden="true">K</span>
</button>
<div id="demo-user-tooltip-3" class="userTooltip__panel" popover="auto">
Comment on lines +32 to +35
@supports (position-anchor: --popover-menu-trigger) {
left: anchor(left);
position: absolute;
top: calc(anchor(bottom) + 0.5rem);
Comment on lines +84 to +90
&[aria-disabled="true"],
&[disabled],
&.-disabled {
color: var(--root-background-color-inactive);
cursor: initial;
pointer-events: none;
}
Comment thread resources/styles/molecules/popoverMenu/index.scss Outdated
@@ -0,0 +1,92 @@
@use '@/core' as *;
khamer and others added 2 commits June 2, 2026 12:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@khamer khamer requested a review from MSchak June 2, 2026 16:13
@khamer
Copy link
Copy Markdown
Member Author

khamer commented Jun 2, 2026

Hey chief of accessibility police @MSchak - I think this is ready for your review.

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.

2 participants