WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Making a screen reader start reading in a desired spot on the screen

for

From: Mark Guisinger
Date: Aug 5, 2015 1:31PM


Here is a simple sample of what I was trying to accomplish with a very basic page:<!DOCTYPE html ><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Second Page</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><script>$(document).ready(function(){ $("#test2").focus();});</script>
</head><h1>Page H1 Heading</h1><h2>Page H2 Heading</h2><label for="first"> First Name</label><input id="first" type="text"  /><br /><h3 id="test2" tabindex="0"> My Heading Test - Should Start Reading Here</h3>
<p>end of page</p><body></body></html>
Thanks,
MarkG


On Wednesday, August 5, 2015 3:25 PM, _mallory < <EMAIL REMOVED> > wrote:


Hi,
tabindex merely makes something focusable, but it's not the same as manually moving
the focus() somewhere. That generally either takes Javascript or a link whose href
matches a target with an id matching the href name.

_mallory

On Wed, Aug 05, 2015 at 07:00:36PM +0000, Mark Guisinger via WebAIM-Forum wrote:
> Hi all,I send my thanks in advance.  I'm working on a web application that has a search form and the results display on the same page.  The results section is hidden when the page is first loaded and displayed when the results are returned.  My problem is when the results are displayed the screen reader will start at the top and read the search form again.  I want to set focus to the results heading and have the screen reader read from there.  I have tried to set the tabindex=0 on the results heading when the results are displayed, that does not appear to be doing what I thought it should in FF and JAWS 15.
> Thanks,MarkG
> > > >