WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Pop-up question

for

From: glen walker
Date: May 16, 2022 10:11AM


This feels like a UX question and not a WCAG conformance question, or at
least that's my take on it.

One might argue that 2.4.3 Focus Order comes into play but having the focus
at the end of the dialog DOM, to me, does not affect "the meaning or
operation" of the page. That is, the focus order does not traverse in an
unusual way. The initial focus position might not be where you expect but
if the dialog is coded properly, I can press TAB and get to all the
elements in the dialog in an expected order and the keyboard focus remains
trapped in the dialog.

Now, you mentioned there are two tabs at the top. Are you referring to
tabs in a tab navigator widget,
https://www.w3.org/TR/wai-aria-practices/#tabpanel ? If so, then I would
expect my initial focus to be on the tab. That is, on the first
interactive element in the dialog. If it's not on the first element, then
that's unexpected, but again, I'm not sure I'd fail 2.4.3.

Whether the close button is in the upper right of the dialog (and the
beginning of the dialog DOM) or at the bottom of the dialog (and the end of
the dialog DOM) doesn't really matter with regards to whether the initial
focus should be on it. That is, if the close button is in the upper right
and the initial focus is on it and you pass WCAG conformance but then
another dialog has the close at the bottom and the initial focus is on it
and you fail WCAG, that would seem to be inconsistent. What you hear with
a screen read would be exactly the same: "close button", (tab key), "tab
navigator widget".

Of course, having a different DOM order means the up/down arrow keys with
the screen reader would read things differently, so you might think 1.3.2
comes into play. I personally don't think it would fail 1.3.2.

I'm just tossing out another take on this. Accessibility is obviously more
than just WCAG conformance. Does WCAG say you should have the focus on the
first interactive element in the dialog? No. Should the focus be on the
first interactive element from a UX perspective? That's generally a good
practice but it can make sense to not do that too.