This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have the following code that creates the <title> on any given page.
Because we have to follow a new Acessibility and Usibility standards, we utilize software the reads text for the blind. In order to divide the page into sections, header level tags are used - H1, H2, H3 - for navigation.
I have tried several ways to get this into the document title with no success - not as text for display but as a snippet of html. So, if you viewed the source, it would read "<h1>TEST - ...</h1>. Any help will be greatly appreciated.
What in the world is this actually doing? Why are you not using the normal title tags?
Joined: May 16, 2003
This is part of a utility function that sets the <title> for all the pages. Much of the reasoning behind this app design was based on use for handicapped and non-handicapped people. This involves a lengthy "Preference" page that allows the user to utilize the built in access modes. In any, this is an app that I inherited because I have to make it compliant with Accessibility Laws. Is it possible to do what I've asked?
Since this snippet of code is what generates the page title, can we add the <h1> there?
Sorry, still clear as mud. What does the <title> tag have to do with the <h1> and other header tags?
Joined: Nov 08, 2001
What they are saying is your page needs to be set up such as
That has nothing to do with a title. The title is plain text that does nothing for the user. If you put html in it, it will not do a thing other then look like <h1>sometext</h1> That would do nothing for a screen reader.
If this can't be done, it can't be done. I was just asking. But, as to the reasoning behind this, the users and the A&U staff wanted to know if we could use the <title> as a source of information for the screen reader to utilize, so they can navigate between apps or screens.
Originally posted by K Robert: If this can't be done, it can't be done.
We're still in the process of trying to figure out what "it" is.
But, as to the reasoning behind this, the users and the A&U staff wanted to know if we could use the <title> as a source of information
Why the title tag? And what kind of information? The title tag contains a simple string that is used to determine the caption to show on the browser window.
Joined: May 16, 2003
Okay - here goes the lengthy version and I am sorry for not posting this at first... Basically, this code snippet(app level *.js):
, grabs this(page level html)
to create the page title. So, basically, the page title and header are created from "id=PageTitle".
In order to facilitate a function in the screen reader, which creates a list box of all <h1>, <h2>, and <h3> tags for navigation; each area needs a heading tag.
Because the page title and heading are created from the "id=PageTitle", we can't wrap the "Blah Blah Blah" title in a heading tag because it will display in the page title as "<h1>Blah Blah Blah</h1>". So, we need away to tag the html w/out it displaying in the title.
As I look back at my previous posts, I think I was misrepresenting my question. Sorry!