Message scroller meets WCAG 2.2 level AA when used as described on these pages. The content is a live log, so screen readers announce new messages without moving focus.
Keyboard
| Key |
Action |
| Tab |
Moves focus to the message list, then into the messages’ buttons and links. |
| ↑ ↓ |
Scroll the list while it has focus. Stops following new messages. |
| Page Up Page Down |
Scroll by a screen. |
| Home End |
Go to the first or the latest message. |
| Enter |
On the jump button: scrolls to its edge. |
role="region" on the viewport, with a name, and tabindex="0", so keyboard users can scroll it.
role="log" with aria-relevant="additions" on the content: new messages are read out politely.
- A visible focus ring on the viewport:
border.width.focused in color.border.focus, inside the edge.
- The jump button is removed from the tab order and hidden from assistive technology (
inert) while there is nothing to jump to.
- It never moves the reader while they are scrolling, so text does not shift under them.
What your team does
- Name the viewport in the page’s language with
aria-label.
- Name the jump button with sr-only text in its slot.
- Keep the list at a fixed height inside the page, so the page itself does not scroll at the same time.
- Load older messages on a button or when the reader reaches the top, not on a timer.
WCAG criteria
| Criterion |
Level |
How |
| 2.1.1 Keyboard |
A |
The viewport takes focus and scrolls with the keys |
| 2.2.2 Pause, Stop, Hide |
A |
Following new messages stops as soon as the reader scrolls |
| 2.4.7 Focus Visible |
AA |
Focus ring on the viewport |
| 4.1.2 Name, Role, Value |
A |
region with a name; jump button named in its slot |
| 4.1.3 Status Messages |
AA |
New messages announced through role="log" |