GithubHelp home page GithubHelp logo

Comments (4)

robdodson avatar robdodson commented on July 18, 2024

When we were first getting into inert we debated this specific topic for a long time. We came to the conclusion that it's better for inert to be consistent, otherwise you could never really trust it. For example, say you put inert on your <body> but elsewhere in the page you load an <iframe> for an ad and tucked in that ad is an inert=false. Developers don't often have fine grained control over the ads code that gets loaded into their site, so this scenario is very possible and would make inert kind of useless.

We proposed a separate primitive for the use case you're describing, tentatively called blockingElements. You can check out a polyfill here. Basically blockingElements lets you say "everyone except for me is inert", whereas inert lets you say "I am inert". Here's a write up I did to explain both in a bit more detail https://robdodson.me/building-better-accessibility-primitives/. Hope that helps!

from inert.

robdodson avatar robdodson commented on July 18, 2024

Gonna close this but happy to reopen for discussion if folks would like to keep the conversation going

from inert.

Jab2870 avatar Jab2870 commented on July 18, 2024

@robdodson , thanks for your responce. Sorry for my late reply. Would you consider doing an A11ycast on blockingElements?

from inert.

robdodson avatar robdodson commented on July 18, 2024

yep I've added it to my list of things I need to talk about :)

from inert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.