WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Having an application element gain focus when the page loads?

for

From: Birkir R. Gunnarsson
Date: Mar 12, 2018 10:37AM


You can focus any element if you add tabindex="-1" to it.
That is the standard approach for the targets of skip links, for
instance, and one of the approaches for modal dialogs (with a lot of
text that we expect the screen reader user to explore before deciding
on an action).

The difference is that there is no "explore" mode in this case, so you
may bbe right there.
Primarily I am thinking, why use the application role at all. It
almost always presents huge potential accessibility issues and it must
be coded very carefully to enable screen reader discovery of all the
data and keyboard access to all the data.
Well, in short, I'm happy I am not responsible for making this thing
accessible *grin*.


On 3/12/18, Patrick H. Lauke < <EMAIL REMOVED> > wrote:
> On 12/03/2018 09:30, Brandon Keith Biggs wrote:
>> Hello,
>> I have a page with:
>> <div role="application"></div>
>>
>> I'm trying to figure out how to properly have it gain focus when the page
>> loads (for both sighted and blind users), and pass all keyboard input to
>> an
>> element.
>
> Assuming the whole page is an application, why not add
> role="application" directly to the <body> ? Or does the page also
> contain other things that are outside of the application area, but you'd
> want THAT to be accessed first?
>
> P
> --
> Patrick H. Lauke
>
> www.splintered.co.uk | https://github.com/patrickhlauke
> http://flickr.com/photos/redux/ | http://redux.deviantart.com
> twitter: @patrick_h_lauke | skype: patrick_h_lauke
> > > > >


--
Work hard. Have fun. Make history.