Get the latest tech news

Introducing command And commandfor In HTML


Learn about the new capabilities for declarative behavior on buttons.

These new attributes can be added to buttons, letting the browser address some core issues around simplicity and accessibility, and provide built-in common functionality. While HTML offers onclick handlers to buttons, these are often disallowed outside of demos or tutorials due to Content Security Policy (CSP) rules. These commands map to their JavaScript counterparts, while also streamlining accessibility (such as providing the aria-details and aria-expanded equivalent relations), focus management, and more.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of command

command

Photo of HTML

HTML

Photo of commandfor

commandfor

Related news:

News photo

Salty game dev comments, easier mods are in Command and Conquer's source code

News photo

Some Command & Conquer games are now open source

News photo

EA Open Sources Command and Conquer: Red Alert, along with other games