WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Focus reset

for

From: glen walker
Date: Apr 17, 2023 9:18AM


As Miriam said, this sounds like the tablist pattern,
https://www.w3.org/WAI/ARIA/apg/patterns/tabs/

When you have role="tablist" on the container and role="tab" on the
buttons, that's a clue to the screen reader user that selecting the button
will update the page (it usually unhides the container with
role="tabpanel").

If your page does not follow the tablist pattern, then is there enough
context on the page to indicate that selecting a button will reveal new
content? For example, the button label might make it obvious if it was
something like "reveal address information". Or the heading for the group
of buttons might have the context.

I rarely move the keyboard focus so your option 1 would be my last choice.
As a keyboard user myself, I don't like it when the page thinks it knows
better than I do where my focus should go. I want to be in control.

If you can't use the tablist pattern and the context of your headings and
button labels don't make it obvious that new content will appear, then
either/both of option 2 and 3 is the next best choice. I prefer 2 over 3
because as a new user to your page, I might want to know that selecting a
button will reveal content but if I visit your page frequently, I don't
want to be constantly told that new content appeared (option 3) everytime I
select a button.