WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: role="alert" not being read on page load

for

From: Isabel Holdsworth
Date: Jun 14, 2019 8:36AM


Hi Joseph,

> If we put the error messages after h1 and h2 and some instructions, should we set focus to the error message div on page load?

No. If you do that, then you're moving the focus past some important
instructions that the user presumably needs to read, and screenreader
users may never move back up the DOM and so may never read your
instructions.

If you position the error just after the H1, blind users will find it
straight away. If you hide it further down in the page, they may not.

The fact that an error has occurred is surely the most important
information on the page. If you don't make it prominent, other users
might miss it too. For example, if the page is zoomed up so the text
is quite large, say twice its normal size, is the error still in the
viewport?

Cheers, Isabel

On 14/06/2019, Joseph Sherman < <EMAIL REMOVED> > wrote:
> If we put the error messages after h1 and h2 and some instructions, should
> we set focus to the error message div on page load?
>
>
>
> Joseph
>
>