E-mail List Archives

Thread: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?

for

Number of posts in this thread: 16 (In chronological order)

From: Duff Johnson
Date: Tue, Apr 21 2015 10:21AM
Subject: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
No previous message | Next message →

Question for the WAI / HTML gurus=E2=80=A6

Imagine a .html file including only the following content:

<p>Some text</p>

(I=E2=80=99ve attached such a file in the hope that the server may allow =
it to the list)

To be clear.. this file does *not* include <doctype, <body>, etc. If it =
doesn=E2=80=99t comply with WCAG; why not?

Thanks,

Duff.

From: Andrew Kirkpatrick
Date: Tue, Apr 21 2015 10:33AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

It isn't best practice for HTML development but I'd say that while the file meets most success criteria it would fail 2.4.2 (Page titled) as the HTML element needed to provide a title is absent.

HTML5 allows the body element to be omitted in some circumstances, and this file would be one such example.

AWK

-----Original Message-----
From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Duff Johnson
Sent: Tuesday, April 21, 2015 12:21 PM
To: WebAIM Discussion List
Subject: [WebAIM] Can HTML tagged content conform to WCAG 2.0 without <body>, etc?

Question for the WAI / HTML gurus…

Imagine a .html file including only the following content:

<p>Some text</p>

(I’ve attached such a file in the hope that the server may allow it to the list)

To be clear.. this file does *not* include <doctype, <body>, etc. If it doesn’t comply with WCAG; why not?

Thanks,

Duff.

From: Duff Johnson
Date: Tue, Apr 21 2015 11:03AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

> It isn't best practice for HTML development but I'd say that while the file meets most success criteria it would fail 2.4.2 (Page titled) as the HTML element needed to provide a title is absent.

I’m not sure how missing a <title> affects the accessibility of the file per se (it seems more like a usability issue rather than a Level A accessibility concern), but I certainly accept that it’s a violation of 2.4.2 as written - thanks.

> HTML5 allows the body element to be omitted in some circumstances, and this file would be one such example.

What about <doctype>? It’s missing as well…

Essentially what I’m getting at is: what’s the minimum required for (notionally) HTML content in order to meet WCAG 2.0?

Thanks,

Duff.

From: Steve Faulkner
Date: Tue, Apr 21 2015 11:13AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

<p><p>

throws 2 errors when tested using http://validator.w3.org/nu/

*Error*: Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE
html>.
*Error*: Element head is missing a required instance of child element title.

the first error is a failure of 4.1.1 Parsing
<http://www.w3.org/TR/WCAG20/#ensure-compat-parses>;

Also note as the document does not define a default language its a failure
of 3.1.1 language of page <http://www.w3.org/TR/WCAG20/#meaning-doc-lang-id>;



--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>;

On 21 April 2015 at 18:03, Duff Johnson < = EMAIL ADDRESS REMOVED = > wrote:

> > It isn't best practice for HTML development but I'd say that while the
> file meets most success criteria it would fail 2.4.2 (Page titled) as the
> HTML element needed to provide a title is absent.
>
> I’m not sure how missing a <title> affects the accessibility of the file
> per se (it seems more like a usability issue rather than a Level A
> accessibility concern), but I certainly accept that it’s a violation of
> 2.4.2 as written - thanks.
>
> > HTML5 allows the body element to be omitted in some circumstances, and
> this file would be one such example.
>
> What about <doctype>? It’s missing as well…
>
> Essentially what I’m getting at is: what’s the minimum required for
> (notionally) HTML content in order to meet WCAG 2.0?
>
> Thanks,
>
> Duff.
> > > > >

From: Jared Smith
Date: Tue, Apr 21 2015 11:18AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

Duff Johnson wrote:

> what’s the minimum required for (notionally) HTML content in order to meet WCAG 2.0?

The following would be fully HTML5 and WCAG conformant:

<!DOCTYPE html>
<html lang="en">
<title>Page Title</title>
<p>Content</p>

Jared

From: Jonathan Avila
Date: Tue, Apr 21 2015 11:39AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

[Steve wrote]

> the first error is a failure of 4.1.1 Parsing <http://www.w3.org/TR/WCAG20/#ensure-compat-parses>;



Does SC 4..1.1 really require a doctype be defined?



SC 4.1.1 states

4.1.1 Parsing: In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features. (Level A)



Note: Start and end tags that are missing a critical character in their formation, such as a closing angle bracket or a mismatched attribute value quotation mark are not complete.



Can you explain which part of SC 4.1.1 is found in violation? My guess is that you are saying without a doctype you can’t determine proper tag starting and ending requirements and nesting requirements, etc., is that correct?



Jonathan



--

Jonathan Avila

Chief Accessibility Officer

SSB BART Group

= EMAIL ADDRESS REMOVED =



703-637-8957 (o)

Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter





-----Original Message-----
From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Steve Faulkner
Sent: Tuesday, April 21, 2015 1:14 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Can HTML tagged content conform to WCAG 2.0 without <body>, etc?



<p><p>



throws 2 errors when tested using http://validator.w3.org/nu/



*Error*: Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE

html>.

*Error*: Element head is missing a required instance of child element title.



the first error is a failure of 4.1.1 Parsing <http://www.w3.org/TR/WCAG20/#ensure-compat-parses>;



Also note as the document does not define a default language its a failure of 3.1.1 language of page <http://www.w3.org/TR/WCAG20/#meaning-doc-lang-id>;







--



Regards



SteveF

HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>;



On 21 April 2015 at 18:03, Duff Johnson < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >> wrote:



> > It isn't best practice for HTML development but I'd say that while

> > the

> file meets most success criteria it would fail 2.4.2 (Page titled) as

> the HTML element needed to provide a title is absent.

>

> I’m not sure how missing a <title> affects the accessibility of the

> file per se (it seems more like a usability issue rather than a Level

> A accessibility concern), but I certainly accept that it’s a violation

> of

> 2.4.2 as written - thanks.

>

> > HTML5 allows the body element to be omitted in some circumstances,

> > and

> this file would be one such example.

>

> What about <doctype>? It’s missing as well…

>

> Essentially what I’m getting at is: what’s the minimum required for

> (notionally) HTML content in order to meet WCAG 2.0?

>

> Thanks,

>

> Duff.

>
> > archives at http://webaim.org/discussion/archives

> >

From: Andrew Kirkpatrick
Date: Tue, Apr 21 2015 12:15PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without<body>, etc?
← Previous message | Next message →

> I’m not sure how missing a <title> affects the accessibility of the file per se (it seems more like a usability issue rather than a Level A accessibility concern), but I certainly accept that it’s a violation of 2.4.2 as written - thanks.

The title is needed for users to be able to understand the identity of the web page/application. This is useful to sighted users who like to glance at the page titles shown in the browser window title or tab area, but for a low vision or blind user becomes a more critical feature as without the title the user needs to read into the content to identify what the page is. Not having this in place results in more time being spent by users to to understand and orient themselves to the content, particularly if the first content on the page or pages is generic navigation content.

What about <doctype>? It’s missing as well…

This would get you into the accessibility supported question. If the browser interprets the content without the DOCTYPE and presents it to the user without any ambiguity, then it is not going to fail 4.1.1 in my opinion. If the browser chokes on the content because it needs the DOCTYPE to render it properly for users, then you would have a 4.1.1 issue.

What's the basis for this thought exercise?
AWK

From: Duff Johnson
Date: Tue, Apr 21 2015 12:39PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

On Apr 21, 2015, at 14:15, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = > wrote:
>
>> I’m not sure how missing a <title> affects the accessibility of the file per se (it seems more like a usability issue rather than a Level A accessibility concern), but I certainly accept that it’s a violation of 2.4.2 as written - thanks.
>
> The title is needed for users to be able to understand the identity of the web page/application. This is useful to sighted users who like to glance at the page titles shown in the browser window title or tab area, but for a low vision or blind user becomes a more critical feature as without the title the user needs to read into the content to identify what the page is.

In such a case both conventional and AT users would have to "read into the content”, would they not? If so, then I don’t understand the distinction you are making.

> Not having this in place results in more time being spent by users to to understand and orient themselves to the content, particularly if the first content on the page or pages is generic navigation content.

…equally true for all users, no?

>> What about <doctype>? It’s missing as well…
>
> This would get you into the accessibility supported question. If the browser interprets the content without the DOCTYPE and presents it to the user without any ambiguity, then it is not going to fail 4.1.1 in my opinion.

> If the browser chokes on the content because it needs the DOCTYPE to render it properly for users, then you would have a 4.1.1 issue.

Ah, so doctype would be required for WCAG 2.0 if it resolves ambiguities, but not because it’s required by the HTML specification?

> What's the basis for this thought exercise?

Just what it seems - I’m trying to understand WCAG 2.0 requirements that are not otherwise clear (to me).

If these matters are patently obvious to all (except me) then I apologize for wasting your time.

Duff.

From: Steve Faulkner
Date: Tue, Apr 21 2015 12:43PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

On 21 April 2015 at 19:15, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = > wrote:

> This would get you into the accessibility supported question. If the
> browser interprets the content without the DOCTYPE and presents it to the
> user without any ambiguity, then it is not going to fail 4.1.1 in my
> opinion. If the browser chokes on the content because it needs the DOCTYPE
> to render it properly for users, then you would have a 4.1.1 issue.


I disagree with you here; the wording of the criteria makes reference to
'specifications'. There is no way to determine if a tag is complete or is
nested correctly or requires an end tag without reference to a
specification. In HTML the way the specification used is identified is via
the doctype.

--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>;

From: Andrew Kirkpatrick
Date: Tue, Apr 21 2015 12:47PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without<body>, etc?
← Previous message | Next message →

In such a case both conventional and AT users would have to "read into the content”, would they not? If so, then I don’t understand the distinction you are making.

Perhaps the official understanding document will be useful for you: http://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-title.html

> Not having this in place results in more time being spent by users to to understand and orient themselves to the content, particularly if the first content on the page or pages is generic navigation content.

…equally true for all users, no?

Absolutely not. If the page title is what is read in a list of search results or a series of browser window titles that the user is trying to find the right window to read into, then the AT user will spend a lot more time that someone who can glance at a page.

> Ah, so doctype would be required for WCAG 2.0 if it resolves ambiguities, but not because it’s required by the HTML specification?

That's correct.

AWK

From: Andrew Kirkpatrick
Date: Tue, Apr 21 2015 1:03PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

> I disagree with you here; the wording of the criteria makes reference to 'specifications'. There is no way to determine if a tag is complete or is nested correctly or requires an end tag without reference to a specification. In HTML the way the specification used is identified is via the doctype.

Sure, and without the DOCTYPE the user agent makes assumptions and the author would need to verify the behavior against what gets presented to the user and to AT. It's more work for the author to prove conformance, but not impossible (especially if the page has only one element in it).

4.1.1 Parsing: In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features. (Level A)

AWK

From: Patrick H. Lauke
Date: Tue, Apr 21 2015 1:09PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

On 21/04/2015 19:43, Steve Faulkner wrote:
> the wording of the criteria makes reference to
> 'specifications'. There is no way to determine if a tag is complete or is
> nested correctly or requires an end tag without reference to a
> specification. In HTML the way the specification used is identified is via
> the doctype.

Also not forgetting the MIME type that a resource is sent as...so, even
in absence of a <!DOCTYPE>, having something sent as text/html is
usually enough to make the browser interpret it as HTML. Plus, most
(all?) browsers will, as a last resort, do some basic pattern matching
("does it end in .htm or .html?").

Getting back to the original question, I'd say that a document doesn't
necessarily have to validate, but follow general "well-formedness" (if
you pardon me borrowing from XML here), for the most part.

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

From: Duff Johnson
Date: Tue, Apr 21 2015 1:50PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

> On Apr 21, 2015, at 14:47, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = > wrote:

>> Ah, so doctype would be required for WCAG 2.0 if it resolves ambiguities, but not because it’s required by the HTML specification?
>
> That's correct.

Thank you for the clarification.

Is this a generalizable point?

Would you say that metadata (<!DOCTYPE> being an example of such) which resolves ambiguities in content is required for WCAG 2.0 conformance generally?

Duff.

From: Steve Faulkner
Date: Tue, Apr 21 2015 2:12PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

From Understanding WCGA 2.0 Parsing:

Since repair techniques vary among user agents, authors cannot assume that
> content will be accurately parsed into a data structure or that it will be
> rendered correctly by specialized user agents, including assistive
> technologies, unless the content is created according to the rules defined
> in the formal grammar for that technology. In markup languages, errors in
> element and attribute syntax and failure to provide properly nested
> start/end tags lead to errors that prevent user agents from parsing the
> content reliably. Therefore, the Success Criterion requires that the
> content can be parsed using only the rules of the formal grammar.
>
http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-parses.html

Reads pretty clear cut to me, as without a conforming doctype, a document
will not be parsed by user agents "using only the rules of the formal
grammar"

--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>;

On 21 April 2015 at 20:50, Duff Johnson < = EMAIL ADDRESS REMOVED = > wrote:

> > On Apr 21, 2015, at 14:47, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = >
> wrote:
>
> >> Ah, so doctype would be required for WCAG 2.0 if it resolves
> ambiguities, but not because it’s required by the HTML specification?
> >
> > That's correct.
>
> Thank you for the clarification.
>
> Is this a generalizable point?
>
> Would you say that metadata (<!DOCTYPE> being an example of such) which
> resolves ambiguities in content is required for WCAG 2.0 conformance
> generally?
>
> Duff.
> > > > >

From: Andrew Kirkpatrick
Date: Tue, Apr 21 2015 2:20PM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without <body>, etc?
← Previous message | Next message →

That's why valid code automatically passes 4.1.1, but code with validation issues require that authors do the work to make sure that content reads correctly. Authors cannot assume, they need to verify.

Of course, valid code simplifies conformance with 4.1.1 greatly.

AWK

-----Original Message-----
From: WebAIM-Forum [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Steve Faulkner
Sent: Tuesday, April 21, 2015 4:13 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Can HTML tagged content conform to WCAG 2.0 without <body>, etc?

From Understanding WCGA 2.0 Parsing:

Since repair techniques vary among user agents, authors cannot assume that
> content will be accurately parsed into a data structure or that it
> will be rendered correctly by specialized user agents, including
> assistive technologies, unless the content is created according to the
> rules defined in the formal grammar for that technology. In markup
> languages, errors in element and attribute syntax and failure to
> provide properly nested start/end tags lead to errors that prevent
> user agents from parsing the content reliably. Therefore, the Success
> Criterion requires that the content can be parsed using only the rules of the formal grammar.
>
http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-parses.html

Reads pretty clear cut to me, as without a conforming doctype, a document will not be parsed by user agents "using only the rules of the formal grammar"

--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>;

On 21 April 2015 at 20:50, Duff Johnson < = EMAIL ADDRESS REMOVED = > wrote:

> > On Apr 21, 2015, at 14:47, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = >
> wrote:
>
> >> Ah, so doctype would be required for WCAG 2.0 if it resolves
> ambiguities, but not because it’s required by the HTML specification?
> >
> > That's correct.
>
> Thank you for the clarification.
>
> Is this a generalizable point?
>
> Would you say that metadata (<!DOCTYPE> being an example of such)
> which resolves ambiguities in content is required for WCAG 2.0
> conformance generally?
>
> Duff.
> > > archives at http://webaim.org/discussion/archives
> >

From: Weissenberger, Todd M
Date: Wed, Apr 22 2015 9:27AM
Subject: Re: Can HTML tagged content conform to WCAG 2.0 without<body>, etc?
← Previous message | No next message

>In such a case both conventional and AT users would have to "read into the content”, would they not? If so, then I don’t understand the distinction you are making.

>> Not having this in place results in more time being spent by users to to understand and orient themselves to the content, particularly if the first content on the page or pages is generic navigation content.

>…equally true for all users, no?

I'd submit that the use of <title> is of greater benefit to a blind screen reader user, for example, than to some other users as the former tends to receive the page contents sequentially, where the latter may possess (many do, you know) a mechanism that permits a much quicker scan and intake process. A good and meaningful title is often the first indication an AT user has of the purpose of the document or resource, and thus enhances one's understanding of what is to come, enabling a clearer and faster decision-making opportunity.

So equally true for all users? I'd say no.

Duff, if you are curious about the rationale for certain WCAG success criteria, I'd also point you to the horse's mouth. " How to Meet WCAG 2.0: A customizable quick reference to Web Content Accessibility Guidelines 2.0 requirements (success criteria) and techniques" (http://www.w3.org/WAI/WCAG20/quickref/Overview.php) is a very digestible resource, and includes links to pages that describe the Intent, Benefits, Techniques, and other background on each Success Criterion. I recommend it for both self-education and as a cure for insomnia.

Cheers,
Todd

-----Original Message-----
From: Duff Johnson [mailto: = EMAIL ADDRESS REMOVED = ]
Sent: Tuesday, April 21, 2015 1:40 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Can HTML tagged content conform to WCAG 2.0 without <body>, etc?

On Apr 21, 2015, at 14:15, Andrew Kirkpatrick < = EMAIL ADDRESS REMOVED = > wrote:
>
>> I’m not sure how missing a <title> affects the accessibility of the file per se (it seems more like a usability issue rather than a Level A accessibility concern), but I certainly accept that it’s a violation of 2.4.2 as written - thanks.
>
> The title is needed for users to be able to understand the identity of the web page/application. This is useful to sighted users who like to glance at the page titles shown in the browser window title or tab area, but for a low vision or blind user becomes a more critical feature as without the title the user needs to read into the content to identify what the page is.

In such a case both conventional and AT users would have to "read into the content”, would they not? If so, then I don’t understand the distinction you are making.

> Not having this in place results in more time being spent by users to to understand and orient themselves to the content, particularly if the first content on the page or pages is generic navigation content.

…equally true for all users, no?

>> What about <doctype>? It’s missing as well…
>
> This would get you into the accessibility supported question. If the browser interprets the content without the DOCTYPE and presents it to the user without any ambiguity, then it is not going to fail 4.1.1 in my opinion.

> If the browser chokes on the content because it needs the DOCTYPE to render it properly for users, then you would have a 4.1.1 issue.

Ah, so doctype would be required for WCAG 2.0 if it resolves ambiguities, but not because it’s required by the HTML specification?

> What's the basis for this thought exercise?

Just what it seems - I’m trying to understand WCAG 2.0 requirements that are not otherwise clear (to me).

If these matters are patently obvious to all (except me) then I apologize for wasting your time.

Duff.