Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Daniel (puresick@imd.social)'s status on Tuesday, 21-Jun-2022 09:25:37 UTC Daniel Daniel

    TIL about the ‚inert’ HTML attribute which prevents user input on elements. This can be used to implement focus traps with less JavaScript for example!

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert

    #html #attribute #inert #web #development #technology #standard

    In conversation Tuesday, 21-Jun-2022 09:25:37 UTC from imd.social permalink

    Attachments

    1. HTMLElement.inert - Web APIs | MDN
      The HTMLElement property inert is a boolean value that, when present, makes the browser "ignore" user input events for the element, including focus events and events from assistive technologies. The browser may also ignore page search and text selection in the element. This can be useful when building UIs such as modals where you would want to "trap" the focus inside the modal when it's visible.

    Feeds

    • Activity Streams
    • RSS 2.0
    • Atom
    • Help
    • About
    • FAQ
    • Privacy
    • Source
    • Version
    • Contact

    Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

    Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.