WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: JAWS reading headings that break twice

for

From: Jukka K. Korpela
Date: Jul 11, 2013 7:30AM


2013-07-11 16:19, Jonathan Metz wrote:

> Some of my colleagues are writing html headings with breaks and the result is that JAWS is reading each line as a separate heading.
>
> For example:
>
> <h2>Starbucks<br/>Coffee<h2>
>
> is read as H2 Starbucks and H2 Coffee.

This sounds like a problem in JAWS. I would even call it a bug, since
there is clearly only one H2 element.

> Is there a better way to code the HTML so headers that have two lines will be read as one header?

I think there's a limit to what authors should do to work around bugs in
browsers and related software, and this clearly is beyond the limits.

Using BR inside H2 is common and completely valid in any HTML version
(except, debatably, in HTML5 / WHATWG HTML, where BR should only be used
to indicate an actual line break in data, as in a postal address - but
this is an obscure and vague requirement). Rendering software should
adapt to it. The use of BR simply indicates line break when the document
is rendered visually and has no implications on other rendering modes
(except that BR acts as word space if needed). In non-visual rendering,
BR could imaginably be rendered as a short pause or as an auditive
signal of some kind, but that would almost always be pointless and
disturbing. Treating BR as dividing an H2 into two H2 elements is simply
wrong.

Technically, you could use e.g.

<h2>Starbucks <span class=line>Coffee</span><h2>

with CSS code

.line { display: block }

Yucca