HTML’s Best Kept Secret: The <output> Tag
denodell.com·1w

Every developer knows <input>. It’s the workhorse of the web.

But <output>? Most have never touched it. Some don’t even know it exists.

That’s a shame, because it solves something we’ve been cobbling together with <div>s and ARIA for years: dynamic results that are announced to screen readers by default.

It’s been in the spec for years. Yet it’s hiding in plain sight.


Here’s what the HTML5 spec says:

The <output> element represents the result of a calculation performed by the application, or the result of a user action.

It’s mapped to role="status" in the accessibility tree. In plain terms, it announces its …

Similar Posts

Loading similar posts...