Skip to content
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

Contain [aria-busy] toggling within Frames #442

Merged
merged 1 commit into from
Nov 12, 2021

Commits on Nov 12, 2021

  1. Contain [aria-busy] toggling within Frames

    Setting `[aria-busy="true"]` on the `<html>` element during a
    `<turbo-frame>` navigation might be too aggressive given the frame's
    value proposition of a compartmentalized request-response cycle. If
    applications style the page based on `html[aria-busy="true"]`, having
    that toggled during (eager or lazy) Frame loading could lead to a
    disorienting experience.
    
    If that isn't the case for applications, they can synchronize the
    attribute themselves with a `MutationObserver`:
    
    ```js
    const observer = new MutationObserver(([ { target } ]) => {
      document.documentElement.setAttribute("aria-busy", target.busy)
    }, { subtree: true, attributeFilter: ["busy"] })
    
    observer.observe(document.body)
    ```
    seanpdoyle committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    2edfc96 View commit details
    Browse the repository at this point in the history