.
And because it has been part of the spec since 2008, support is
excellent across browsers and screen readers. It also plays nicely
with any JavaScript framework you might be using, like React or Vue.
One thing to note:
is for results tied to user inputs and
actions, not global notifications like toast messages. Those are
better handled with role="status" or role="alert" on a generic
element, since they represent system feedback rather than calculated
output.
So what does this look like in practice?
Real world examples
I've personally reached for in multiple real-world projects
since discovering it:
Simple calculator app
During a recent 20-minute coding challenge, I used to
display calculation results. Without adding a single ARIA role, the
screen reader announced each result as it updated. No hacks required.
Range slider formatting
At Volvo Cars, we displayed user-friendly versions of slider values.
Internally the slider might hold 10000, but the output showed 10,000
miles/year. We wrapped the slider and in a container with
role="group" and a shared label, creating a cohesive React component:
Annual mileage
setMileage(Number(e.target.value))}
/>
{mileage.toLocaleString()} miles/year
Form validation feedback
I found that password strength indicators and real-time validation
messages work beautifully with .
Password
Password strength: Strong
Server-calculated output? No problem.
The tag even fits modern patterns where you might fetch
prices from APIs, show tax calculations, or display server-generated
recommendations.
Here, a shipping cost calculator updates an tag, informing
users once the cost has been calculated:
export function ShippingCalculator() {
const [weight, setWeight] = useState("");
const [price, setPrice] = useState("");
useEffect(() => {
if (weight) {
// Fetch shipping price from server based on package weight
fetch(`/api/shipping?weight=${weight}`)
.then((res) => res.json())
.then((data) => setPrice(data.price));
}
}, [weight]);
return (
);
}
Satisfaction guaranteed
There's something satisfying about using a native HTML element for
what it was designed for, especially when it makes your UI more
accessible with less code.
might be HTML's best kept secret, and discovering gems like
this shows how much value is still hiding in the spec.
Sometimes the best tool for the job is the one you didn't even know
you had.
Update 11 Oct 2025: The ever-excellent Bob Rudis has produced a
working example page to support this post. Find it here: https://
rud.is/drop/output.html
---------------------------------------------------------------------
Comments? Join the discussion on Hacker News - Dev.to -
Share: Twitter/X * LinkedIn * Copy link
---------------------------------------------------------------------
Related Posts
* European stars surrounding a screen with accessibility icons.
The Web Is About to Get Better for Everyone, Everywhere 23 July
2025
What happens when accessibility stops being a best practice and
starts being the law? We're about to find out.
Read more -
* A tangled web of wires labelled with different CSS approaches.
We Keep Reinventing CSS, but Styling Was Never the Problem 6
August 2025
We keep changing how we style the web, but the real problem isn't
CSS. It's how we build around it.
Read more -
Enjoyed this? Get more like it to your inbox.
No spam. Just occasional deep dives on frontend engineering and
developer experience.
[ ] [Subscribe]
(c) 2025 Den Odell
Built using Astro & Tailwind CSS