The problem with non-semantic HTML
A site built with nested divs can look exactly like one built with semantic HTML. But for Google, for screen readers, and for the developer maintaining it months later, the difference is huge.
The semantic tags that matter most
header: the header of the page or a section, with the logo and main navigation. nav: a navigation block, which lets screen readers jump straight to the navigation. main: the main content; there should be only one per page. article: self-contained content such as a blog post or a news item. section: a thematic grouping that should always have a heading. aside: related but non-essential content, such as a sidebar or widgets. footer: the page footer, with contact details and legal links.
Heading hierarchy: the most frequent mistake
There should be only one h1 per page. h2s are the main sections, and h3s are subsections of those h2s. Never skip levels for visual reasons: if you want smaller text, use CSS. Google uses headings to understand the structure of the content.
Basic accessibility every site should have
- Every image should have descriptive alt text, or an empty alt if it's decorative.
- Links should have descriptive text. 'Click here' says nothing out of context.
- The contrast between text and background should meet a minimum ratio of 4.5:1.
- The site should be fully navigable with the keyboard alone (Tab, Enter, arrow keys).
- Forms should have a label associated with every input.
ARIA: when to use it and when not to
The golden rule: don't use ARIA if there's a native HTML element that does the same thing. A button with role='button' is redundant. A div with role='button' is a patch that signals you should be using a real button.