1

When I added details elements as direct childs of an element with popover attribute on, I faced a problem with keyboard interactions. I can easily tab through all my focusable content inside the popover, but when it comes to the first details I can trigger it with keyboard, but cannot tab any further. So I end up with some focusable elements being unreachable with keybord.

This is very simple example for demo purposes:

<button popovertarget="popover">Open popover</button>
<div id="popover" popover>
    <a href="#">Link 1</a>
    <a href="#">Link 2</a>
    <button>Button 1</button>
    <button>Button 2</button>
    <button>Button 3</button>
    <details>
        <summary>First summary</summary>
        <p>First paragraph</p>
    </details>
    <button>Button 4</button>
    <details>
        <summary>Second summary</summary>
        <p>Second paragraph</p>
    </details>
    <details>
        <summary>Third summary</summary>
        <p>Third paragraph</p>
    </details>
    <details>
        <summary>Forth summary</summary>
        <p>Forth paragraph</p>
    </details>
</div>

Surprisingly the problem doesn't occur when details are put inside the dialog. Of course outside modals it doesn't occur neither. I cannot understand what causes the problem with popover. Do I have to use dialog for this instead? I think my use case doesn't fit well the semantics of dialog.

1 Answer 1

0

I came across the same issue, there is a chrome bug open for this: https://issues.chromium.org/issues/424764874?pli=1

Firefox had a similar issue too, but this is fixed in the latest update.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.