daisy / ace

Ace by DAISY, an Accessibility Checker for EPUB
MIT License
76 stars 22 forks source link

EPUB with missing structural markup not reported as WCAG violation #212

Closed bitsgalore closed 6 years ago

bitsgalore commented 6 years ago

This EPUB file contains text that is structured like this:

<div class="kop" id="toc-anchor36"><span class="cursief">Berichten.</span></div>
<div class="onderkop" id="toc-anchor37">I. Drukfout.</div>
<div class="plat">In mijn brief uit Parijs (zie vorig nommer) is een drukfout
ingeslopen, die de lezers wel reeds zullen hebben gevonden. Waar gesproken wordt
van het bekende schilderij van Mad: Vigée - Lebrun, voorstellend Marie Antoinette
met haar kinderen, staat namelijk abusievelijk: Lodewijk XVIII, inplaats van
<span class="vet">Lodewijk XVII.</span></div>

The above div elements represent a heading, a sub-heading and some main content. Looking at WCAG 1.3.1:

1.3.1 Info and Relationships: Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text. (Level A)

Success criteria are here.

The div elements don't contain landmark roles, and there is no native semantic markup. So shouldn't this raise a WCAG 2.0 A violation?

Note that it's entirely possible I'm simply misinterpreting WCAG myself (e.g. the remark that "Other techniques may also be sufficient if they meet the success criterion" allows rather a lot of space for interpretation).

mattgarrish commented 6 years ago

So shouldn't this raise a WCAG 2.0 A violation?

It should, yes, but this is why you can't rely on machines to fully assess accessibility. There's no reliable way a tool like Ace could determine what the markup should have been in cases like this. If it goes too far off into heuristic tests, like no heading in a file generating a warning, the more false positives it risks throwing at users. That's why you also need to perform manual inspection for quality issues like this.

rdeltour commented 6 years ago

@mattgarrish is right (of course 😄). Ace's shares the philosophy of the underlying aXe library (used to check Web accessibility violations), which is that we're trying to report zero false-positives. In other words, all the issues reported by Ace are real accessibility issues (or else it's a bug 😅); when Ace is not sure or cannot tell, Ace says nothing and defers to a later manual checking.

Closing this issue as invalid, but feel free to continue the discussion if you have any comments or questions!

bitsgalore commented 6 years ago

@mattgarrish @rdeltour Thanks for the explanation, this is useful to know! (And yes looking at the long list of possible techniques mentioned in WCAG I totally understand testing for things like these would be a total nightmare!)