WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Headings: requirements vs best practices

for

From: Birkir R. Gunnarsson
Date: Jun 22, 2016 4:49AM


I remind people that the title element is the text that gets posted
when users share the URL to the page on Facebook. It often helps. :)
The title element is still the first thing that screen readers
announce when a page load, or when switching between tabs , on desktop
and mobile. Also when identifying a page in your browsing history (if
you type in a word in the address bar, then press arrow down to see if
browser has suggestions based on your browsing history).
It is a shame if browsers have started hiding this info for users in general.
I have both seen (well heard) and written JQuery code that takes the
contents of the h1 heading to construct a page title, using the
pattern that Mr. Foliot described. It is convenient.
Having the page title and the h1 heading content match is only a best
practice though.
Cheers
-B


On 6/22/16, Olaf Drümmer < <EMAIL REMOVED> > wrote:
> As anything that can be done automatically will usually be more consistent
> and less error prone: would it be considered to automatically build the
> content of a web page's <title> tag by using something that identifies the
> owner/publisher of the website, followed by the contents of the first <h1>
> (assuming it reflects the intended on page title of the web page)?
>
> Also: when you say "AT will still announce them", how would that apply to AT
> other then screen readers?
>
> Olaf
>
>
>> On 22.06.2016, at 01:19, Patrick H. Lauke < <EMAIL REMOVED> > wrote:
>>
>> On 22/06/2016 00:04, Olaf Drümmer wrote:
>>> Right, and the <title> tag goes in the head.
>>>
>>> But how does the <title> title relate to the <h1> title, if at all? Which
>>> roles does <title> play? Does WCAG or anything else mandate anything
>>> about it? The <title> tag used to show up in the document window title,
>>> but these days document window titles are often gone (definitely on
>>> mobile devices, and in tabbed window browsers they have become pretty
>>> useless once several tabs are there).
>>
>> But AT will still announce them when, say, switching between tabs. For
>> this reason (as well as those mentioned by John Foliot) I'd say it's still
>> relevant, in light of 2.4.2 Page titled.
>>
>> Ideally, <title> and <h1> should be complementary/reinforce each other.
>> <title> would often include more information (e.g. the actual section of
>> the site you're in, as well as the actual site name), so it's not really a
>> case of both having to have exact same content - just (as a best practice)
>> that they shouldn't contradict each other, I'd say...
>>
>> 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.