DOM order is important

On this page, I will be demonstrating how the DOM order is important for screen reader and keyboard users alike.

If you use a screen reader with this page and have the page read out, you will see how the page is read in DOM order. Since I have added 2 links, the tab order will also be wrong in the bad (first) example.

This is a responsive page, so please try a small and large screen. The switch occurs at 43.75rem/700px. The small screen shows the DOM order, the larger screen will show the reorder via flexbox.

First a bad example.

Card title 1

CTA

Description text that will be a bit longer.

category

A man holding and looking intently at a small kitten. The kitten looks bored into the camera.

Now a better example.

A man holding and looking intently at a small kitten. The kitten looks bored into the camera.

Card title 2

category

Description text that will be a bit longer.

CTA

So, remember: Order is important!