Bug 131920

Summary: AX: expose (heading) level based on heading elements outline depth
Product: WebKit Reporter: Steve Faulkner <faulkner.steve>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: faulkner.steve, jcraig, m.goleb+bugzilla, mike, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Steve Faulkner 2014-04-20 15:04:52 PDT
Currently the HTML5 outline algorithm [1] is not implemented, propose implementing and exposing as a DOM method  so developers and 3rd part software such as assistive technology can provide a document outline to users. 

The HTML5 outline algorithm is implemented in conformance checkers:
http://validator.w3.org/nu/ 
https://github.com/validator/

and browser extensions:
https://chrome.google.com/webstore/detail/html5-outliner/afoibpobokebhgfnknfndkgemglggomo?hl=en

[1] http://www.w3.org/html/wg/drafts/html/master/sections.html#outlines

Implement 'heading role, with the aria-level property set to the element's outline depth' as per  
http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-implicit-aria-semantics

Acc API mappings
http://rawgit.com/w3c/html-api-map/master/index.html#el-h1-h6

* MSAA + IAccessible2 *
Role:  IA2_ROLE_HEADING 
Object attributes:  level:<heading_level> 
Interfaces:  IAccessibleText2; IAccessibleHypertext2; 

*ATK*
Role:  ATK_ROLE_HEADING 
Object attributes:  level:<heading_level> 
Interfaces:  AtkText; AtkHypertext  

*AX*
AXRole: AXHeading 
AXSubrole: (nil) 
AXRoleDescription: "heading" 
Properties: Use AXLevel to expose the heading level
Comment 1 Radar WebKit Bug Importer 2014-04-20 15:05:20 PDT
<rdar://problem/16671435>
Comment 2 Steve Faulkner 2014-04-21 01:58:49 PDT
related HTML spec bug
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25003
Comment 3 James Craig 2014-04-21 15:45:30 PDT
There is some ongoing discussion in the W3C bug that should be addressed before we consider changing WebKit.
Comment 4 Steve Faulkner 2014-04-21 23:00:58 PDT
(In reply to comment #3)
> There is some ongoing discussion in the W3C bug that should be addressed before we consider changing WebKit.

There is also an issue with outline depth calculation as currently specced that needs to be resolved
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25394