Description
The top card of this issue will be updated as this work progresses
The purpose of this issue is to determine whether or not WCAG 2.1, success criterion 4.1.1 Parsing is still relevant to the accessibility of web content for people with disabilities. The web accessibility landscape has changes significantly since this criterion was proposed in 2008. Many accessibility experts are of the opinion that this success criterion is largely irrelevant, and that the part that is still relevant is addressed by other success criteria. If this is true, success criterion 4.1.1 could potentially be deprecated as part of WCAG 2.2.
Plan of Action
For this proposal, we'll go through the following steps:
- Identify categories of conformance issues that need to be tested [ready for review]
- Identify which markup languages require testing [in progress]
- Determine which assistive technologies need to be tested
- Create test cases, and perform assistive technology tests
- Analyse the results and create a proposal for WCAG 2.2
Background
Web technologies have developed significantly since the creation of WCAG 2.0, where this success criterion was introduced. In HTML 4.01 and older versions, there was no description of what to do with malformed HTML. This caused HTML parsers to behave differently in different environments. HTML 5.0 included a detailed definition of how to parse malformed HTML. This has ensured that all modern browsers parse HTML exactly the same way.
The second reason why 4.1.1 was relevant in 2008, was because assistive technologies frequently had their own build-in HTML parser. Rather than rely on the browser to build up the accessibility tree, assistive technologies would build their own accessibility tree based on the HTML of a page. Improvements in browsers and standardisation efforts have made the accessibility trees more reliable. Assistive technologies in 2019 use the accessibility tree directly, rather than parse HTML and build their own.
Step 1: Breakdown of 4.1.1 Parsing
Scope
Success criterion 4.1.1 is applicable to all content implemented in markup languages.
Requirement 1
Elements have complete start and end tags.
This requirement can be broken down further:
-
A closing tag exists for each element that require a closing tag (such as
main
,h1
,strong
, etc.) -
None of the closing tags are for elements that do not allow closing tags (such as
img
,input
,meta
, etc.) -
Each closing tag has a corresponding opening tag positioned before the closing tag of its parent node (e.g.
<div><h1></h1></div>
rather than<div><h1></div></h1>
)
Requirement 2
Elements are nested according to their specifications.
-
The root node of a document is an element that is allowed as the root node (e.g.
html
is the root of HTML documents, andsvg
for SVG documents) -
Each child node of an element is of a type allowed in its content model. (e.g.
p
is allowedstrong
, but noth1
)
Requirement 3
Elements do not contain duplicate attributes.
This requirement is often "expanded" to mean attributes must be marked up correctly.
-
Elements do not contain duplicate attributes (e.g.
<p class="foo" class="bar">...</p>
should be<p class="foo bar">...</p>
, and<input readonly="readonly" readonly>
should be<input readonly>
) -
Unquoted attributes (under certain circumstances) * (e.g.
<p id=alexander-'the-great'>
should be<p id="alexander-'the-great'">
or<p id=alexander-the-great>
) -
Mismatched quotes on attributes * (e.g.
<p id="main'>
should be<p id="main">
or<p id='main'>
) -
Attributes not space separated * (e.g.
<p id="main"class="main">
should be<p id="main" class="main">
) -
Attributes are not malformed * (e.g.
<p id:"main">
should be<p id="main">
))
*: It is debatable whether or not points 2 through 5 are required by the success criterion. Either way it is worth exploring whether or not these cause accessibility issues.
The same attribute and attribute + value combination can exist on different elements, just not on the same element.
Requirement 4
Any IDs are unique.
-
IDs used in IDREFs are unique (e.g
<label for="name">name</label><input id="name">
) -
IDs used referenced by internal links are unique (e.g
<h1 id="hd1"><a href="#hd1">Heading 1</a></h1>
) -
IDs used on user interface components are unique (e.g
<button id="submit">Submit</button>
) -
IDs used on any element unique (e.g
<p id="my-style-be4d-c66d4b51819f">...</p>
)
Note 1: IDs in different DOM trees are not required to be unique. The same ID can exist in different shadow DOM trees, since ID referencing across different trees is not valid.
Note 2: Elements hidden through CSS are not allowed duplicate IDs. IDREFs work regardless of if an element is visible. For example, aria-labelledby can use hidden elements for the computation of an accessible name.
Step 2: Scope "Markup languges"
In order for any markup language to be relevant for SC 4.1.1 Parsing, it must meet the following requirements:
- It can be served as a web page
- It is supported by assistive technologies
- It is implemented in a user agent
Markup Language | Web Page | User Agent | Assistive Technology |
---|---|---|---|
HTML: The Markup Language | Yes | Web Browsers | |
SVG: Scalable Vector Graphics | Yes | Web Browsers | |
MathML: Mathematical Markup Language | |||
SMIL: Synchronized Multimedia Integration Language | |||
TTML: Timed Text Markup Language | |||
EmotionML: Emotion Markup Language | |||
EMMA: Extensible MultiModal Annotation markup language | |||
InkML: Ink Markup Language | |||
VoiceXML: Voice Extensible Markup Language | |||
SSML: Speech Synthesis Markup Language |
To do: Fill out the table
Step 3: Assistive Technologies
TBD as part of step 3.
Step 4: Testing
TBD as part of step 4.
Step 5: Conclusion And Recommendations
TBD as part of step 5.